Model reference · open weights
Infinity-0625-Llama3 is an open-weight language model from BAAI. Infinity-Instruct-3M-0625-Llama3-8B (BF16) weighs 16.1 GB; the smallest configuration that runs it is 2× RTX 3060 12 GB.
Summary of the BAAI/Infinity-Instruct-3M-0625-Llama3-8B model card, 2026-10-01
What it is
| Released by | BAAI |
|---|---|
| Released | 2024-07-09 |
| Parameters | 8.0B |
| VRAM | 16.1 GB for the weights |
What it runs on
| Card | Requests at once | Context max | Memory |
|---|---|---|---|
| 8K each | |||
| RTX 3060 12 GB … RTX 4060 Ti 16 GB 2 smaller cards | — | — | |
| RTX 3090 24 GB | 6 | all 8K | 23.4 GB |
| RTX 4090 24 GB | 6 | all 8K | 23.4 GB |
| RTX 5090 32 GB | 13 | all 8K | 31.0 GB |
| L40S 48 GB | 25 | all 8K | 44.0 GB |
| A100 80 GB | 57 | all 8K | 78.2 GB |
| H100 80 GB | 53 | all 8K | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | 67 | all 8K | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 80 | all 8K | 107 GB |
| H200 141 GB | 109 | all 8K | 138 GB |
| B200 180 GB | 143 | all 8K | 176 GB |
| 2× RTX 3060 12 GB tensor parallel | 5 | all 8K | 11.6 GB a card |
| 2× RTX 4060 Ti 16 GB tensor parallel | 12 | all 8K | 15.4 GB a card |
| 2× RTX 4090 24 GB tensor parallel | 27 | all 8K | 23.4 GB a card |
| 2× RTX 3090 24 GB tensor parallel | 27 | all 8K | 23.4 GB a card |
| Requests at once | 8K tokens each |
|---|---|
| 1 | 17.9 GB |
| 5 | 22.2 GB |
| 8 | 25.4 GB |
| 16 | 34.0 GB |
| 32 | 51.2 GB |
| 64 | 85.5 GB |
One card, with vLLM's small-card settings.
From the model card
Infinity-Instruct-3M-0625-Llama3-8B is an opensource supervised instruction tuning model without reinforcement learning from human feedback (RLHF). This model is just finetuned on Infinity-Instruct-3M and Infinity-Instruct-0625 and showing favorable results on AlpacaEval 2.0 and MT-Bench.
🔥🔥🔥[2024/07/09] We release the model weights of InfInstruct-Mistral-7B 0625, InfInstruct-Qwen2-7B 0625, InfInstruct-Llama3-8B 0625, InfInstruct-Llama3-70B 0625, and InfInstruct-Yi-1.5-9B 0625.
🔥🔥🔥[2024/07/09] We release the chat dataset Infinity-Instruct-0625, it is a upgraded version of the Infinity-Instruct-0613.
🔥🔥🔥[2024/06/28] We release the model weight of InfInstruct-Llama3-70B 0613. It shows favorable results on AlpacaEval 2.0 compared to GPT4-0613 without RLHF.
🔥🔥🔥[2024/06/21] We release the model weight of InfInstruct-Mistral-7B 0613. It shows favorable results on AlpacaEval 2.0 compared to Mixtral 8x7B v0.1, Gemini Pro, and GPT-3.5 without RLHF.
🔥🔥🔥[2024/06/13] We share the intermediate result of our data construction process (corresponding to the InfInstruct-3M in the table below). Our ongoing efforts focus on risk assessment and data generation. The finalized version with 10 million instructions is scheduled for release in late June.
Infinity-Instruct-3M-0625-Llama3-8B is tuned on Million-level instruction dataset Infinity-Instruct. First, we apply the foundational dataset Infinity-Instruct-3M to improve the foundational ability (math & code) of Llama3-8B, and get the foundational instruct model Infinity-Instruct-3M-Llama3-8B. Then we finetune the Infinity-Instruct-3M-Llama3-8B to get the stronger chat model Infinity-Instruct-3M-0625-Llama3-8B. Here is the training hyperparamers.
epoch: 3
lr: 5e-6
min_lr: 0
lr_warmup_steps: 40
lr_decay_style: cosine
weight_decay: 0.0
adam_beta1: 0.9
adam_beta2: 0.95
global_batch_size: 528
clip_grad: 1.0
Thanks to FlagScale, we could concatenate multiple training samples to remove padding token and apply diverse acceleration techniques to the traning procudure. It effectively reduces our training costs. We will release our code in the near future!
| Model | MT-Bench | AlpacaEval2.0 |
|---|---|---|
| GPT 3.5 Turbo 0613 | 8.4 | 22.7 |
| Mixtral 8x7B v0.1 | 8.3 | 23.7 |
| Gemini Pro | -- | 24.4 |
| GPT4-0613 | 9.2 | 30.2 |
| Llama-3-8B-Instruct | -- | 22.9 |
| InfInstruct-3M-0625-Llama3-8B* | 8.2 | 27.5 |
*denote the model is finetuned without reinforcement learning from human feedback (RLHF).
We evaluate Infinity-Instruct-3M-0625-Llama3-8B on the two most popular instructions following benchmarks. Mt-Bench is a set of challenging multi-turn questions including code, math and routine dialogue. AlpacaEval2.0 is based on AlpacaFarm evaluation set. Both of these two benchmarks use GPT-4 to judge the model answer. AlpacaEval2.0 displays a high agreement rate with human-annotated benchmark, Chatbot Arena.
Infinity-Instruct-3M-0625-Llama3-8B adopt the same chat template of Llama3-7B-instruct:
How are you?assistant
Hi!user
How are you?assistant
To apply this model and template in conversation scenarios, you can refer to the following code:
from transformers import AutoModelForCausalLM, AutoTokenizer, LogitsProcessorList
import torch
device = "cuda" # the device to load the model onto
model = AutoModelForCausalLM.from_pretrained("BAAI/Infinity-Instruct-3M-0625-Llama3-8B",
torch_dtype=torch.bfloat16,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("BAAI/Infinity-Instruct-3M-0625-Llama3-8B")
prompt = "Give me a short introduction to large language model."
messages = [
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(device)
logits_processor = LogitsProcessorList(
[
MinLengthLogitsProcessor(1, eos_token_id=tokenizer.eos_token_id),
TemperatureLogitsWarper(0.7),
]
)
generated_ids = model.generate(
model_inputs.input_ids,
logits_processor=logits_processor,
max_new_tokens=512
)
generated_ids = [
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)
The resources, including code, data, and model weights, associated with this project are restricted for academic research purposes only and cannot be used for commercial purposes. The content produced by any version of Infinity Instruct is influenced by uncontrollable variables such as randomness, and therefore, the accuracy of the output cannot be guaranteed by this project. This project
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.