This model extends LLama-3 8B's context length from 8k to over 1m tokens.
89.9K Pulls Updated 6 months ago
Updated 6 months ago
6 months ago
ed7c53c8b502 · 26GB
Readme
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.
Large Context Window
Note: using a 256k context window requires at least 64GB of memory. Using a 1M+ context window requires significantly more (100GB+).
To extend the context window (to 256k for example) use:
API
curl http://localhost:11434/api/generate -d '{
"model": "llama3-gradient",
"prompt": "Why is the sky blue?",
"options": {
"num_ctx": 256000
}
}'
CLI
ollama run llama3-gradient
>>> /set parameter num_ctx 256000