Model reference · open weights
Llama-3-Gradient-1048k is an open-weight language model from gradientai. Llama-3-8B-Instruct-Gradient-1048k (BF16) weighs 16.1 GB; the smallest configuration that runs it is 2× RTX 3060 12 GB.
For self-hosting, compare this build's requirements below with the GPU you plan to rent.
Summary of the gradientai/Llama-3-8B-Instruct-Gradient-1048k model card, 2026-10-01
What it is
| Released by | gradientai |
|---|---|
| Released | 2024-04-29 |
| Parameters | 8.0B |
| VRAM | 16.1 GB for the weights |
What it runs on
| Card | Requests at once | Context max | Memory | |
|---|---|---|---|---|
| 8K each | 32K each | |||
| RTX 3060 12 GB … RTX 4060 Ti 16 GB 2 smaller cards | ||||
| RTX 3090 24 GB | 6 | 1 | 49K | 23.4 GB |
| RTX 4090 24 GB | 6 | 1 | 48K | 23.4 GB |
| RTX 5090 32 GB | 13 | 3 | 105K | 31.0 GB |
| L40S 48 GB | 25 | 6 | 202K | 44.0 GB |
| A100 80 GB | 57 | 14 | 457K | 78.2 GB |
| H100 80 GB | 53 | 13 | 426K | 78.1 GB |
| RTX PRO 6000 Blackwell 96 GB | 67 | 16 | 543K | 93.8 GB |
| DGX Spark (GB10) 128 GB unified | 80 | 20 | 643K | 107 GB |
| H200 141 GB | 109 | 27 | 872K | 138 GB |
| B200 180 GB | 143 | 35 | all 1024K | 176 GB |
| 2× RTX 3060 12 GB tensor parallel | 5 | 1 | 42K | 11.6 GB a card |
| 2× RTX 4060 Ti 16 GB tensor parallel | 12 | 3 | 98K | 15.4 GB a card |
| 2× RTX 4090 24 GB tensor parallel | 27 | 6 | 217K | 23.4 GB a card |
| 2× RTX 3090 24 GB tensor parallel | 27 | 6 | 217K | 23.4 GB a card |
| Requests at once | 8K tokens each | 32K tokens each |
|---|---|---|
| 1 | 17.9 GB | 21.1 GB |
| 5 | 22.2 GB | 38.3 GB |
| 8 | 25.4 GB | 51.2 GB |
| 16 | 34.0 GB | 85.5 GB |
| 32 | 51.2 GB | 154 GB |
| 64 | 85.5 GB | 292 GB |
One card, with vLLM's small-card settings.
From the model card
Join our custom agent and long context (262k-1M+) waitlist: https://forms.gle/L6TDY7dozx8TuoUv7
Gradient incorporates your data to deploy autonomous assistants that power critical operations across your business. If you're looking to build custom AI models or agents, email us a message contact@gradient.ai. For more info see our end-to-end development service for custom LLMs and AI systems
This model extends LLama-3 8B's context length from 8k to > 1040K, developed by Gradient, sponsored by compute from Crusoe Energy. It demonstrates that SOTA LLMs can learn to operate on long context with minimal training by appropriately adjusting RoPE theta. We trained on 830M tokens for this stage, and 1.4B tokens total for all stages, which is < 0.01% of Llama-3's original pre-training data.
Update (5/3): We further fine-tuned our model to strengthen its assistant-like chat ability as well.
Updated NIAH result:
RULER evals:
Approach:
Infra:
We build on top of the EasyContext Blockwise RingAttention library [3] to scalably and efficiently train on contexts up to 1048k tokens on Crusoe Energy high performance L40S cluster.
Notably, we layered parallelism on top of Ring Attention with a custom network topology to better leverage large GPU clusters in the face of network bottlenecks from passing many KV blocks between devices. This gave us a 33x speedup in model training (compare 524k and 1048k to 65k and 262k in the table below).
Data:
For training data, we generate long contexts by augmenting SlimPajama. We also fine-tune on a chat dataset based on UltraChat [4], following a similar recipe for data augmentation to [2].
Progressive Training Details:
| 65K | 262K | 524k | 1048k | |
|---|---|---|---|---|
| Initialize From | LLaMA-3 8B | 65K | 262K | 524k |
| Sequence Length 2^N | 16 | 18 | 19 | 20 |
| RoPE theta | 15.3 M | 207.1 M | 1.06B | 2.80B |
| Batch Size | 1 | 1 | 16 | 8 |
| Gradient Accumulation Steps | 32 | 16 | 1 | 1 |
| Steps | 30 | 24 | 50 | 50 |
| Total Tokens | 62914560 | 100663296 | 419430400 | 838860800 |
| Learning Rate | 2.00E-05 | 2.00E-05 | 2.00E-05 | 2.00E-05 |
| # GPUs | 8 | 32 | 512 | 512 |
| GPU Type | NVIDIA L40S | NVIDIA L40S | NVIDIA L40S | NVIDIA L40S |
| Minutes to Train (Wall) | 202 | 555 | 61 | 87 |
Evaluation:
EVAL_MAX_CONTEXT_LENGTH=1040200
EVAL_MIN_CONTEXT_LENGTH=100
EVAL_CONTEXT_INTERVAL=86675
EVAL_DEPTH_INTERVAL=0.2
EVAL_RND_NUMBER_DIGITS=8
HAYSTACK1:
EVAL_GENERATOR_TOKENS=25
HAYSTACK2:
EVAL_CONTEXT_INTERVAL=173350
EVAL_GENERATOR_TOKENS=150000
HAYSTACK3:
EVAL_GENERATOR_TOKENS=925000
All boxes not pictured for Haystack 1 and 3 are 100% accurate. Haystacks 1,2 and 3 are further detailed in this blog post.
Quants:
--max-model-len 32768https://gradient.ai/
Gradient is accelerating AI transformation across industries. Our AI Foundry incorporates your data to deploy autonomous assistants that power critical operations across your business.
Drop an email to contact@gradient.ai
@misc{gradientlongcontextllama3,
title={Llama 3 Gradient: A series of long context models},
author={Leonid Pekelis and Michael Feil and Forrest Moret and Mark Huang and Tiffany Peng},
year={2024},
url = {https://gradient.ai/blog/scaling-rotational-embeddings-for-long-context-language-models},
doi = { 10.57967/hf/3372 },
}
[1] Peng, Bowen, et al. "Yarn: Efficient context window extension of large language models." arXiv preprint arXiv:2309.00071 (2023).
[2] Liu, Hao, et al. "World Model on Million-Length Video And Language With RingAttention." arXiv preprint arXiv:2402.08268 (2024).
[3] https://github.com/jzhang38/EasyContext
[4] Ning Ding, Yulin Chen, Bokai Xu, Yujia Qin, Zhi Zheng, Shengding Hu, Zhiyuan Liu, Maosong Sun, and Bowen Zhou. Enhancing chat language models by scaling high-quality instructional conversations. arXiv preprint arXiv:2305.14233, 2023.
Meta developed and released the Meta Llama 3 family of large language models (LLMs), a collection of pretrained and instruction tuned generative text models in 8 and 70B sizes. The Llama 3 instruction tuned models are optimized for dialogue use cases and outperform many of the available open source chat models on co
Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.