Fox-1: Open Small Language Model for Cloud and Edge

Zijian Hu, Jipeng Zhang, Rui Pan, Zhaozhuo Xu, Shanshan Han, Han Jin, Alay Dilipbhai Shah, Dimitris Stripelis, Yuhang Yao, Salman Avestimehr, Tong Zhang, Chaoyang He

TL;DR

Fox-1 is an open-source, 1.6-billion-parameter small language model (SLM) designed for efficient deployment on cloud and edge devices. By combining a "deep and thin" 32-layer architecture, a massive 256K vocabulary, and a novel 3-stage data curriculum that scales context length from 2K to 8K tokens, Fox-1 delivers performance that matches or exceeds models twice its size while maintaining a remarkably low memory footprint.

What Problem Does This Paper Address?

While giant Large Language Models (LLMs) boast impressive capabilities, their massive size makes them incredibly expensive to train, environmentally taxing, and impractical to deploy on consumer edge devices or cost-constrained cloud environments.

Small Language Models (SLMs) offer a more sustainable alternative, but squeezing high performance out of fewer parameters is challenging. Current research lacks clear consensus on how to optimally structure the training curriculum and organize data across different stages of pre-training. The authors introduce Fox-1 to demonstrate how careful architectural choices and a progressive data curriculum can maximize the efficiency and capability of a compact model.

Methods

The authors developed Fox-1 using a decoder-only transformer architecture with several distinct innovations:

  • Deeper, Thinner Network: Rather than building a wide, shallow model, Fox-1 utilizes 32 self-attention layers. This is 78% deeper than Gemma-2B (18 layers) and 33% deeper than Qwen1.5-1.8B (24 layers), a design choice intended to boost reasoning capabilities.
  • Shared Embeddings: To accommodate a massive vocabulary of 256,000 tokens without exploding the parameter count, Fox-1 shares weights between its input and output embedding layers. This single optimization saved approximately 0.5 billion parameters—roughly 30.49% of the final model size.
  • Grouped Query Attention (GQA): Fox-1 uses GQA with 16 attention heads and 4 key-value heads to accelerate inference and reduce memory usage.
  • 3-Stage Sequence Length Curriculum: To efficiently train the model on long contexts without incurring the massive quadratic compute costs from day one, the authors implemented a progressive training schedule:
  • Stage 1 (~39% of data): 1.05T tokens chunked into 2K-length samples.
  • Stage 2 (~59% of data): 1.58T tokens from diverse domains, scaling up to 4K–8K lengths.
  • Stage 3 (~0.02% of data): 62B tokens of ultra-high-quality, curated data to polish downstream capabilities.

Datasets

Fox-1 was pre-trained on a total of 3 trillion tokens of web-scraped document data and fine-tuned on 5 billion tokens of instruction-following and multi-turn conversation data. The pre-training mix includes:

  • Public Web Corpora: Common Crawl, C4, and Wikipedia (spanning 20 languages).
  • Specialized Domains: The Stack (Code), Open-Web-Math, algebraic-stack, PubMed Central, and academic papers from RedPajama and Dolma.
  • Curated & Synthetic Data: Instruction datasets, Flan, and RewriteBooks—a dataset of high-quality books rewritten using Mixtral-8x22B to maximize text quality.

For evaluation, the authors utilized standard benchmarks from the Open LLM Leaderboard, including ARC Challenge, HellaSwag, TruthfulQA, MMLU, Winogrande, and GSM8k.

Key Insights and Ideas

  • Depth Favors Reasoning: Squeezing more layers into a smaller width parameter helps compact models retain strong logical reasoning capabilities, allowing Fox-1 to punch well above its weight class in math benchmarks.
  • Large Vocabularies Pay Off: A 256K vocabulary means each token carries denser information. This implicitly extends the effective context window and reduces the likelihood of encountering unknown words, which directly translates to better downstream task performance.
  • Curriculum Training Mitigates Quadratic Cost: Gradually ramping up the chunk length from 2K to 8K tokens allows the model to naturally acquire long-context capabilities at a fraction of the computational cost compared to training on long sequences from the start.

Key Results

Fox-1 achieves an average score of 47.13% across the six core benchmarks, outperforming larger models like Gemma-2B and StableLM-2-1.6B.

Figure 2: Performance compared to other SLMs.
  • Mathematical Reasoning: On the GSM8k benchmark, Fox-1 achieved 36.39%, significantly outperforming Qwen1.5-1.8B (34.04%) and more than doubling Gemma-2B (17.06%).
  • World Knowledge: On MMLU, Fox-1 scored 43.05%, outperforming Gemma-2B (41.15%) and StableLM-2-1.6B (39.16%).
  • Inference Speed & Memory: When deployed via vLLM in BF16 precision, Fox-1 achieved a throughput exceeding 200 tokens per second per user under low concurrency. Crucially, it requires only 3703 MiB of GPU memory, making it substantially lighter than Qwen1.5-1.8B (4739 MiB) and Gemma-2B (5379 MiB).
Figure 3: Inference speed compared to other SLMs.

Limitations and Future Work

While Fox-1 features a large vocabulary designed to support multilingual capabilities, it is currently optimized and evaluated primarily as an English-only model. Additionally, the paper focuses heavily on the pre-training curriculum and basic instruction tuning; the authors do not explore advanced post-training alignment techniques (such as RLHF or DPO), which represents a natural next step for the conversational variants of the model.

Summary updated

BibTeX
@misc{hu2024fox,
  author = {Zijian Hu and Jipeng Zhang and Rui Pan and Zhaozhuo Xu and Shanshan Han and Han Jin and Alay Dilipbhai Shah and Dimitris Stripelis and Yuhang Yao and Salman Avestimehr and Tong Zhang and Chaoyang He},
  title = {{Fox-1: Open Small Language Model for Cloud and Edge}},
  year = {2024},
  eprint = {2411.05281},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.05281},
}
Figure