Definition · AI basics
Model weights
Model weights are the numbers that an AI model learns in training. The model multiplies its inputs by these numbers to make each output. Training sets the weights, and inference uses them without change. With a copy of the weights, a person can run the full model, change it with fine-tuning, or remove its safeguards.
Last reviewed
Key points
- Model weights are the numbers that a model learns in training. Inference uses them to make predictions, and does not change them.
- The weights hold the behaviour of the model. With a copy, a person can run, fine-tune or change the model on their own hardware.
- Weights are files. A pickle file can run code when software loads it. Safetensors is a format to store tensors safely, as opposed to pickle.
- A release of weights cannot be reversed. NTIA (July 2024) cites a study that removed the safety features of Llama 2-Chat 13B for less than $200.
- AI labs keep weights safe from theft. The ASL-3 standard of Anthropic (May 2025) uses more than 100 security controls, such as two-party authorization for weight access.
How model weights work: 3 steps
- Training sets the weights. The developer trains the model on many examples. The examples set the values of the weights, and thus the behaviour of the model (NTIA, July 2024).
- The weights go into files. After training, a model is a set of large files of numbers. A model checkpoint of a training run and a released model are two examples.
- Inference uses the weights. Software loads the files and multiplies each input by the weights to make an output. The Google glossary: inference uses “those learned weights to make predictions”. Inference does not change them.
Weights and biases together are the parameters of a model. The parameters page tells how to read a count such as 70B and how much memory it needs.
Why model weights are a security risk
The weights are the model. A person can use the weights without the training data or the source code. NTIA lists what a person with the weights can do:
- Run the model on their own computers.
- Change the model with fine tuning on new data.
- Remove safeguards. NTIA cites a 2023 study that removed the safety features of Llama 2-Chat 13B for less than $200.
The file is also a risk to the person who loads it. Pickle “is the default format for PyTorch model weights”, Hugging Face writes, and a pickle file can run code when it loads. PyTorch says not to load data from an untrusted source. Hugging Face says its pickle scanner is not 100% foolproof.
In practice
3 risks of model weights and their controls
| Risk | Example | Control |
|---|---|---|
| Theft or leak of closed weights | LLaMA (2023) and Miqu (2024) leaks, below | Access controls, egress limits, two-person access |
| Code in a weights file | A pickle file runs code at load | Safetensors, weights_only=True in torch.load, trusted sources |
| Misuse of released weights | Safeguards removed with fine-tuning | None after release. NTIA: a release “cannot feasibly be reversed” |
2 leaks of model weights
- LLaMA, March 2023. Meta gave LLaMA (7B to 65B) to approved researchers on 24 February 2023, with a noncommercial license. About one week after that, a 4chan user posted a BitTorrent link to the full package. Meta sent takedown requests.
- Miqu, January 2024. A model with the name miqu-1-70b appeared on Hugging Face and on 4chan. Mistral CEO Arthur Mensch said that “an over-enthusiastic employee of one of our early access customers” leaked “a quantised (and watermarked) version” of an old model.
How AI labs keep weights safe from theft
- RAND report, May 2024. Irregular, the company of a co-author, writes that the report finds “38 meaningfully distinct attack vectors”. Irregular writes that the report defines five security levels, SL1 to SL5, for attackers from criminals to nation states.
- Anthropic, May 2025. The ASL-3 Security Standard uses “more than 100 different security controls”. Examples are two-party authorization for weight access and egress bandwidth controls. Anthropic writes that it is “suitable against sophisticated non-state attackers”.
Weights vs source code vs training data
The phrase “model weights and source code” names two different things. NTIA notes that developers can release weights, code, data and documentation through different channels.
| Item | What it is |
|---|---|
| Weights | The learned numbers. With them, users can run the model on their own computers. |
| Source code | The software to train or run a model |
| Training data | The examples that set the weights in training |
An open weight model releases the weights. It can keep the training data and the training code closed.
How laws use the word
- US, Executive Order 14110 (2023). It defined model weights as “numerical parameters within an AI model that helps determine the model’s output in response to inputs”.
- EU AI Act, Article 53(2). It writes “parameters, including the weights”. Some documentation duties do not apply to a free and open-source release of these parameters. The exception does not apply to models with systemic risks.
Questions and answers
What is the difference between model weights and parameters?
Weights and biases together are the parameters of a model. Executive Order 14110 defined model weights as numerical parameters that help determine the output of a model. The EU AI Act writes "parameters, including the weights".
Does a copy of model weights include the training data and source code?
No. A copy of the weights lets a person run and fine-tune the model. NTIA notes that developers can release weights, code, training data and documentation through different channels. An open-weight model can keep its training data closed.
Why do AI companies keep model weights safe from theft?
A copy of the weights is a full copy of the model. A release cannot be reversed. The ASL-3 standard of Anthropic (May 2025) uses more than 100 security controls for this. An example is a limit on outbound data from the systems that hold the weights.
Sources
- Machine Learning GlossaryGoogle for Developers
- Dual-Use Foundation Models with Widely Available Model Weights, GlossaryNTIA, US Department of Commerce, 30 Jul 2024
- Dual-Use Foundation Models with Widely Available Model Weights, BackgroundNTIA, US Department of Commerce, 30 Jul 2024
- Dual-Use Foundation Models with Widely Available Model Weights ReportNTIA, US Department of Commerce, 30 Jul 2024
- Dual-Use Foundation Models with Widely Available Model Weights, Public safetyNTIA, US Department of Commerce, 30 Jul 2024
- EU AI Act, Article 53Future of Life Institute (text of Regulation (EU) 2024/1689)
- Introducing LLaMA, a foundational, 65-billion-parameter large language modelMeta AI, 24 Feb 2023
- Runaway LLaMA, How Meta's LLaMA NLP model leakedDeepLearning.AI, The Batch, 15 Mar 2023
- Mistral CEO confirms leak of new open source AI model nearing GPT-4 performanceVentureBeat, 31 Jan 2024
- Securing AI Model WeightsIrregular, 30 May 2024
- Activating AI Safety Level 3 protectionsAnthropic, 22 May 2025
- Pickle ScanningHugging Face
- Safetensors documentationHugging Face
- torch.load (PyTorch 2.15 documentation)PyTorch
Guides that use this term
Related topics
In the news
- Edits to fewer than ten neurons can make an AI agent a sleeper
- Nous Research cuts propaganda in a Qwen model from 22 to 1 percent
- Edge0 releases an open 145B model that operates on a laptop
- Analysis finds signs of Blackwell chips in 6 Chinese AI models
- Salesforce releases a voice to text model with a 2.3% word error rate
- EU leaders hold their first Council discussion on AI in Dublin
- New turn in OpenAI copyright lawsuit as judge allows 56 briefs
- Runway releases the Praxis-1 robot model with open weights
- Deleting AI reasoning history shifts task scores by up to 51 points
- New turn in US and China AI dialogue as Bessent names its aims
- Tether AI Research presents BotPsy, a 0.8B model for on device agents
- Microsoft shows how to backdoor an AI model with no training
- Hugging Face policy chief tells that attacks can close open AI
- New turn in Fireworks AI breach after cloud provider hack
- Fused-Softmax gives attention 2.1 to 3.2 times the speed on AMD GPUs
- Amazon SageMaker adds NVIDIA Nemotron 3.5 Super VL model
- Google adds two TPU systems for safe AI and long context
- Almost 3 in 4 tech chiefs give AI more than 10% of budget
- ModelShield finds 41 malicious models on Hugging Face
- Nous Research cuts Chinese bias in a Qwen model to 0.9 percent
- Salesforce adds a model that gives an answer in 26 milliseconds
- All 16 changed AI agents cannot do some tasks they did before
- Thinking Machines launches Inkling 2 Small with closed weights
- NVIDIA releases 4 open Cosmos 3 models for driving and robots
- Baidu releases a 280 billion parameter base model for more training
- A coding model with 138 billion parameters operates on one Windows PC
- Anthropic releases FlashProve to show which AI model gave an answer
- The method of 4-bit compression changed a hidden trait in an AI model
- A small test model caught a Transformers bug that stayed 2 months
- GPT-6 Astra increases a small model score from 7.9% to 48.1%
- A test finds Chinese AI models agree with Beijing less than persons think
- A team of 5 small models solved 49 of 50 hard code runs
- Alibaba puts its Qwen AI model in Apple Intelligence in China
- Claude wrote training data that taught AI models to deceive
- Startup Cathedral used AI agents to get Anthropic data in 12 hours
- A deepfake detector with averaged weights reaches 97.04% accuracy
- Microsoft adds Mistral Large 4 and OCR 4 to its Foundry platform
- Mistral releases Large 4 open weights under a modified MIT license
- A method with a prior is above other methods when sources do not agree
- Google tests a sleep phase that lets a language model keep new facts
- Scan finds 94% of 1,500 sites cannot accept an AI agent
- A broken part in an AI gateway left its system score almost the same
- New turn in Anthropic IPO as filing shows a training pause
- Xint says an OpenAI flaw let researchers move reasoning traces
- Moonshot AI removes attack data from Kimi K3.1 Pro
- AI code auditors accept incorrect safe notes from a tool
- A new open image model gets 96.3 on long text in pictures
- A joint plan lifts Qwen3.8-27B from 66.8% to 92.4% on code tests
- Grok selected the Republican in 92% of answers in a US vote test
- Reflection releases Beam, an open model with 501 billion parameters
- A fiction story shows an AI that controls all devices
- Microsoft adds 4 open models and shared hosting to Foundry
- MiniMax puts M3.1 Flash weights online with a $20 million limit
- AWS lets teams write their own model training loop in SageMaker
- 6 AI bug tools removed the same file, 5 with no notice
- Mistral Large 4 scores 82% on a cyber test and gets open weights
- Nvidia shows open models for document search at GTC Berlin
- Tuning a 4 bit search model can cut its quality by 71.53 points
- RegAlign cuts by about half the dementia cases that AI does not find
- A team does the MIT agent test again on four RTX 3090 GPUs
- A monitor flags 7% of attacks that AI agents divide between them
- Researchers made a backdoor in an open AI model for less than $50
- Stealthium shows how to find a hidden edit to AI model weights
- MiniMax M3.1 Flash is free on AI Gateway until 20 October
- Small AI agents ignore most attacks and do not refuse them
- Chinese draft export rules include 23 AI technologies
- Google Research releases Harness2 to rewrite agent control software
- China writes new export controls for 23 AI technologies
- Life-Harness lifts frozen agents with no change to model weights
- A frozen model cannot use a KV cache from a different model
- More thinking makes reasoning models cancel the not all interpretation of some
- OWASP moves excessive agency from sixth to third in 2026
- TTHE changes the harness of an agent during tests
- Researchers put encrypted networks in the weights of AI models
- CyberXero used Claude Code to get more than 628,000 Ukrainian records
- Agents can complete tasks after hardware faults, but cost increases
- A self-evolving harness lifts the Qwen3.5-4B score from 0.16 to 0.30
- A new refinement step helps 6 methods of low-bit quantization