Abstract
We introduce the Bittensor Language Model, called "BTLM-3B-8K", a new state-of-the-art 3 billion parameter open-source language model. BTLM-3B-8K was trained on 627B tokens from the SlimPajama dataset with a mixture of 2,048 and 8,192 context lengths. BTLM-3B-8K outperforms all existing 3B parameter models by 2-5.5% across downstream tasks. BTLM-3B-8K is even competitive with some 7B parameter models. Additionally, BTLM-3B-8K provides excellent long context performance, outperforming MPT-7B-8K and XGen-7B-8K on tasks up to 8,192 context length. We trained the model on a cleaned and deduplicated SlimPajama dataset; aggressively tuned the μP hyperparameters and schedule; used ALiBi position embeddings; and adopted the SwiGLU nonlinearity. On Hugging Face, the most popular models have 7B parameters, indicating that users prefer the quality-size ratio of 7B models. Compacting the 7B parameter model to one with 3B parameters, with little performance impact, is an important milestone. BTLM-3B-8K needs only 3GB of memory with 4-bit precision and takes 2.5x less inference compute than 7B models, helping to open up access to a powerful language model on mobile and edge devices. BTLM-3B-8K is available under an Apache 2.0 license on Hugging Face.
Introduction
In the current Large Language Model (LLM) landscape, the "7B" model size (such as LLaMA-7B) has emerged as an industry standard, offering a favorable balance between capability and portability. However, 7B models remain prohibitively heavy for many edge devices, including smartphones and standard laptops, particularly when low-latency inference is required.
Smaller 3B models exist but have historically suffered from a significant "intelligence gap" compared to their 7B counterparts and often lack support for long context lengths. BTLM-3B-8K was developed to close this gap, creating a model that fits in just 3GB of memory (at 4-bit precision) while performing at the level of much larger systems.
Architecture and Training Methodology
The researchers optimized the BTLM-3B-8K architecture and training recipe using several key technical innovations:
- Maximal Update Parameterization (μP): This allows for hyperparameter tuning on a small "proxy" model that reliably transfers to the full-scale model. It provides exceptional training stability, enabling higher learning rates without the risk of loss spikes.
- SwiGLU Nonlinearity: Replacing the standard GELU activation function with SwiGLU improved the model's expressive power and overall accuracy.
- ALiBi Position Embeddings: By using Attention with Linear Biases (ALiBi) instead of learned positions, the model can extrapolate to longer sequences than those encountered during training.
- Two-Phase Training: The model was first trained on 470B tokens at a 2,048 context length, followed by a second phase of 157B tokens at an 8,192 context length to efficiently teach the model to handle long-range dependencies.
Data and Evaluation
BTLM-3B-8K was trained on 627 billion tokens from SlimPajama, a rigorously cleaned and deduplicated version of the 1.2 trillion token RedPajama dataset. This approach prioritizes data quality over raw volume, following the principle that "less is more" when the training signal is cleaner.
The model was evaluated across 22 benchmarks, including common sense reasoning (PIQA, HellaSwag), science questions (ARC), multitask knowledge (MMLU), and coding (HumanEval). For long-context assessment, the team utilized QMSum and GovReports for summarization, alongside the LongEval benchmark to test information retrieval across massive documents.
Key Results and Discussion
BTLM-3B-8K achieves state-of-the-art results for its size class, outperforming existing 3B models like OpenLLaMA 3B and StableLM 3B by 2% to 5.5%. More impressively, it is competitive with several 7B models, including the original Falcon-7B and StableLM-7B, despite having less than half the parameters.
In long-context tasks, BTLM-3B-8K demonstrated superior performance. At the 8K token limit, it outperformed MPT-7B-8K and XGen-7B-8K, models specifically designed for long sequences. This suggests that the combination of ALiBi and the two-phase training schedule is highly effective for long-range dependency modeling.
One notable finding is the "Efficiency of Over-training." While Chinchilla-optimal scaling suggests a specific data-to-parameter ratio, BTLM-3B-8K is intentionally over-trained. This higher upfront training cost results in massive rewards for inference efficiency, making the model significantly cheaper and faster for end-users.
Conclusion and Limitations
While BTLM-3B-8K excels in reasoning and logic, it lags slightly behind 7B models in "World Knowledge" (closed-book fact retrieval). This indicates that raw parameter count may still be a bottleneck for storing vast amounts of factual data. Additionally, as a base model, it has not yet undergone safety fine-tuning or instruction-following optimization.
Nonetheless, BTLM-3B-8K represents a major milestone in model compression and efficiency. By requiring 2.5x less compute for inference than 7B models and fitting into the RAM of modern mobile devices, it opens new possibilities for high-performance, local AI applications.
Summary updated