Model reference · open weights

Llama-3-Gradient-1048k

LLMs gradientai Text gen 1 build Open, with conditions 36k dl/mo

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.

  • Llama-3-Gradient-1048k is an 8.0B parameter text-generation model developed by gradientai that extends the context length of the Llama-3 8B base to 1,048,576 tokens.
  • The model supports English and is distributed under the llama3 license.
  • It was trained on 830M tokens for the final stage to optimize RoPE theta for long-context operations.

Summary of the gradientai/Llama-3-8B-Instruct-Gradient-1048k model card, 2026-10-01

What it is

Released bygradientai
Released2024-04-29
Parameters8.0B
VRAM16.1 GB for the weights

What it runs on

Memory and cards for Llama-3-8B-Instruct-Gradient-1048k (BF16)

16.1 GBweights, file size
131 MBcache per 1K tokens
745 MBruntime overhead, at least
1,048,576 tokenscontext max
CardRequests at onceContext maxMemory
8K each32K each
RTX 3060 12 GB … RTX 4060 Ti 16 GB
2 smaller cards
RTX 3090 24 GB6149K23.4 GB
RTX 4090 24 GB6148K23.4 GB
RTX 5090 32 GB133105K31.0 GB
L40S 48 GB256202K44.0 GB
A100 80 GB5714457K78.2 GB
H100 80 GB5313426K78.1 GB
RTX PRO 6000 Blackwell 96 GB6716543K93.8 GB
DGX Spark (GB10) 128 GB unified8020643K107 GB
H200 141 GB10927872K138 GB
B200 180 GB14335all 1024K176 GB
2× RTX 3060 12 GB
tensor parallel
5142K11.6 GB a card
2× RTX 4060 Ti 16 GB
tensor parallel
12398K15.4 GB a card
2× RTX 4090 24 GB
tensor parallel
276217K23.4 GB a card
2× RTX 3090 24 GB
tensor parallel
276217K23.4 GB a card
Memory needed at each load
Requests at once8K tokens each32K tokens each
117.9 GB21.1 GB
522.2 GB38.3 GB
825.4 GB51.2 GB
1634.0 GB85.5 GB
3251.2 GB154 GB
6485.5 GB292 GB

One card, with vLLM's small-card settings.

From the model card

What gradientai says about Llama-3-Gradient-1048k

Read 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:

  • Our model is behind only GPT-4 and Yi in the retrieval and Q&A tasks
  • It’s the smallest parameter model to rank in the top 7 overall

Approach:

  • meta-llama/Meta-Llama-3-8B-Instruct as the base
  • NTK-aware interpolation [1] to initialize an optimal schedule for RoPE theta, followed by empirical RoPE theta optimization
  • Progressive training on increasing context lengths, similar to Large World Model [2] (See details below)

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:

65K262K524k1048k
Initialize FromLLaMA-3 8B65K262K524k
Sequence Length 2^N16181920
RoPE theta15.3 M207.1 M1.06B2.80B
Batch Size11168
Gradient Accumulation Steps321611
Steps30245050
Total Tokens62914560100663296419430400838860800
Learning Rate2.00E-052.00E-052.00E-052.00E-05
# GPUs832512512
GPU TypeNVIDIA L40SNVIDIA L40SNVIDIA L40SNVIDIA L40S
Minutes to Train (Wall)2025556187

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:

The Gradient AI Team

https://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.

Contact Us

Drop an email to contact@gradient.ai

Citation:

@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 },
}

References

[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.


Base Model

Model Details

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.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms