Commit ·
f1b1e8e
1
Parent(s): c946726
Add Julian 600M paper (EN+FR) with LaTeX sources
Browse files- .gitattributes +1 -0
- JulianKrg_600M_paper.pdf +3 -0
- README.md +119 -0
- julian_paper.tex +984 -0
- julian_paper_fr.pdf +3 -0
- julian_paper_fr.tex +1028 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
*.pdf filter=lfs diff=lfs merge=lfs -text
|
JulianKrg_600M_paper.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6b8fecfe13439aff4677a7d891d3ded5036c6c66e02995f9242d206a587568f4
|
| 3 |
+
size 209504
|
README.md
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
- fr
|
| 6 |
+
tags:
|
| 7 |
+
- research-paper
|
| 8 |
+
- language-model
|
| 9 |
+
- julian
|
| 10 |
+
- jax
|
| 11 |
+
- tpu
|
| 12 |
+
- llama
|
| 13 |
+
- bilingual
|
| 14 |
+
- sft-analysis
|
| 15 |
+
- scaling-laws
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# Julian: Efficient Training of a Bilingual 600M Parameter Language Model on TPU with JAX
|
| 19 |
+
|
| 20 |
+
**Paper** by Julian Kerignard | February 2026
|
| 21 |
+
|
| 22 |
+
## Abstract
|
| 23 |
+
|
| 24 |
+
We present **Julian**, a family of decoder-only language models ranging from 100M to 600M parameters, trained entirely from scratch on up to **39 billion tokens** of bilingual English-French data (70%/30%) using JAX/Flax on Google Cloud TPU v4-32. Our largest model, Julian-600M, employs a modern transformer architecture with Rotary Position Embeddings (RoPE), SwiGLU activations, and RMSNorm, following the design principles of LLaMA.
|
| 25 |
+
|
| 26 |
+
Despite being trained on significantly fewer tokens than comparable models, Julian-600M achieves **53.5% on HellaSwag**, outperforming OPT-1.3B (41.5%) which has over twice the parameters and was trained on 8x more data. We further analyze supervised fine-tuning (SFT) dynamics, revealing a critical disconnect between training loss reduction and downstream task performance.
|
| 27 |
+
|
| 28 |
+
## Files
|
| 29 |
+
|
| 30 |
+
| File | Description |
|
| 31 |
+
|------|-------------|
|
| 32 |
+
| [`JulianKrg_600M_paper.pdf`](JulianKrg_600M_paper.pdf) | Full paper (English) |
|
| 33 |
+
| [`julian_paper_fr.pdf`](julian_paper_fr.pdf) | Full paper (French) |
|
| 34 |
+
| [`julian_paper.tex`](julian_paper.tex) | LaTeX source (English) |
|
| 35 |
+
| [`julian_paper_fr.tex`](julian_paper_fr.tex) | LaTeX source (French) |
|
| 36 |
+
|
| 37 |
+
## Key Results
|
| 38 |
+
|
| 39 |
+
### Pretraining Performance
|
| 40 |
+
|
| 41 |
+
| Model | Params | Tokens | HellaSwag | PIQA | LAMBADA |
|
| 42 |
+
|-------|--------|--------|-----------|------|---------|
|
| 43 |
+
| **Julian-600M** | **600M** | **39B** | **53.5%** | **66.8%** | **37.3%** |
|
| 44 |
+
| OPT-1.3B | 1.3B | 300B | 41.5% | 71.7% | 58.0% |
|
| 45 |
+
| GPT-2 XL | 1.5B | ~40B | 50.9% | 70.8% | 51.2% |
|
| 46 |
+
| Pythia-1B | 1B | 300B | 37.6% | 69.2% | 56.6% |
|
| 47 |
+
| BLOOM-560M | 560M | 350B | 37.1% | 64.5% | 36.5% |
|
| 48 |
+
|
| 49 |
+
Julian-600M outperforms OPT-1.3B on HellaSwag with **2x fewer parameters** and **7.7x fewer tokens**.
|
| 50 |
+
|
| 51 |
+
### Critical SFT Finding
|
| 52 |
+
|
| 53 |
+
Our paper provides a detailed analysis of supervised fine-tuning dynamics on 2.47M instruction-response pairs:
|
| 54 |
+
|
| 55 |
+
| Configuration | Steps | Epochs | Loss | HellaSwag | PIQA | WinoGrande |
|
| 56 |
+
|---------------|-------|--------|------|-----------|------|------------|
|
| 57 |
+
| Base model | - | - | - | 53.5% | 66.8% | 53.8% |
|
| 58 |
+
| SFT-30K | 30K | 0.66 | 1.86 | 53.2% | 66.5% | 53.8% |
|
| 59 |
+
| SFT-100K | 100K | 2.2 | 1.69 | 53.2% | 66.5% | 52.8% |
|
| 60 |
+
|
| 61 |
+
**Key insight**: Training loss decreases 9% between SFT-30K and SFT-100K, but benchmark performance stagnates or degrades. This reveals that **training loss is not a reliable proxy for SFT quality** — the model memorizes instruction patterns rather than improving generalization. We recommend limiting SFT to <1 epoch for datasets >1M examples and using held-out benchmarks as stopping criteria.
|
| 62 |
+
|
| 63 |
+
## Architecture
|
| 64 |
+
|
| 65 |
+
```
|
| 66 |
+
Decoder-only Transformer (600M parameters)
|
| 67 |
+
├── Layers: 18
|
| 68 |
+
├── Hidden: 1280
|
| 69 |
+
├── Heads: 16 (head_dim = 80)
|
| 70 |
+
├── FFN: 5120 (SwiGLU)
|
| 71 |
+
├── Vocab: 50,000 (SentencePiece)
|
| 72 |
+
├── Context: 2048 tokens
|
| 73 |
+
├── Position: RoPE (θ = 10000)
|
| 74 |
+
└── Norm: RMSNorm (pre-norm)
|
| 75 |
+
```
|
| 76 |
+
|
| 77 |
+
## Paper Contents
|
| 78 |
+
|
| 79 |
+
1. **Introduction** — Motivation and contributions
|
| 80 |
+
2. **Related Work** — Comparison with Pythia, OPT, LLaMA, TinyLlama
|
| 81 |
+
3. **Model Architecture** — Detailed design choices (RoPE, SwiGLU, RMSNorm)
|
| 82 |
+
4. **Training Infrastructure** — Multi-host TPU training with JAX, data pipeline, checkpointing
|
| 83 |
+
5. **Data** — Collection, cleaning, tokenization (Wikipedia, FineWeb-Edu, OSCAR, The Stack)
|
| 84 |
+
6. **Pretraining** — Hyperparameters, loss curves, scaling analysis
|
| 85 |
+
7. **Supervised Fine-Tuning** — SFT methodology, ChatML format, training dynamics
|
| 86 |
+
8. **Evaluation** — Benchmark results across 7 tasks with detailed comparisons
|
| 87 |
+
9. **SFT Analysis** — Critical findings on loss vs. benchmark divergence
|
| 88 |
+
10. **Conclusion** — Practical recommendations for efficient LLM training
|
| 89 |
+
|
| 90 |
+
## Models
|
| 91 |
+
|
| 92 |
+
All model weights are openly available:
|
| 93 |
+
|
| 94 |
+
| Model | Link |
|
| 95 |
+
|-------|------|
|
| 96 |
+
| Julian-600M Base (39B tokens) | [JulianKrgd/julian-600m-40b](https://huggingface.co/JulianKrgd/julian-600m-40b) |
|
| 97 |
+
| Julian-600M Instruct SFT-30K | [JulianKrgd/julian-600m-40b-instruct-sft30k](https://huggingface.co/JulianKrgd/julian-600m-40b-instruct-sft30k) |
|
| 98 |
+
| Julian-600M Instruct SFT-100K | [JulianKrgd/julian-600m-40b-instruct-sft100k](https://huggingface.co/JulianKrgd/julian-600m-40b-instruct-sft100k) |
|
| 99 |
+
|
| 100 |
+
## Citation
|
| 101 |
+
|
| 102 |
+
```bibtex
|
| 103 |
+
@misc{kerignard2026julian,
|
| 104 |
+
author = {Julian Kerignard},
|
| 105 |
+
title = {Julian: Efficient Training of a Bilingual 600M Parameter Language Model on TPU with JAX},
|
| 106 |
+
year = {2026},
|
| 107 |
+
url = {https://huggingface.co/JulianKrgd/julian-600m-paper}
|
| 108 |
+
}
|
| 109 |
+
```
|
| 110 |
+
|
| 111 |
+
## License
|
| 112 |
+
|
| 113 |
+
Apache 2.0 — All paper content, LaTeX sources, and associated materials.
|
| 114 |
+
|
| 115 |
+
## Acknowledgments
|
| 116 |
+
|
| 117 |
+
- **Google TPU Research Cloud** for compute access
|
| 118 |
+
- **Hugging Face** for model hosting and open-source tools
|
| 119 |
+
- **JAX/Flax teams** for the ML framework
|
julian_paper.tex
ADDED
|
@@ -0,0 +1,984 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\documentclass[11pt,a4paper]{article}
|
| 2 |
+
|
| 3 |
+
% ============================================================================
|
| 4 |
+
% Packages
|
| 5 |
+
% ============================================================================
|
| 6 |
+
\usepackage[utf8]{inputenc}
|
| 7 |
+
\usepackage[T1]{fontenc}
|
| 8 |
+
\usepackage{times}
|
| 9 |
+
\usepackage{geometry}
|
| 10 |
+
\geometry{margin=1in}
|
| 11 |
+
\usepackage{amsmath,amssymb}
|
| 12 |
+
\usepackage{graphicx}
|
| 13 |
+
\usepackage{booktabs}
|
| 14 |
+
\usepackage{hyperref}
|
| 15 |
+
\usepackage{url}
|
| 16 |
+
\urlstyle{same}
|
| 17 |
+
\usepackage{natbib}
|
| 18 |
+
\usepackage{xcolor}
|
| 19 |
+
\usepackage{array}
|
| 20 |
+
\usepackage{float}
|
| 21 |
+
\usepackage{enumitem}
|
| 22 |
+
\usepackage{fancyvrb}
|
| 23 |
+
\usepackage{pgfplots}
|
| 24 |
+
\pgfplotsset{compat=1.18}
|
| 25 |
+
|
| 26 |
+
\hypersetup{
|
| 27 |
+
colorlinks=true,
|
| 28 |
+
linkcolor=blue!60!black,
|
| 29 |
+
citecolor=blue!60!black,
|
| 30 |
+
urlcolor=blue!60!black
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
% ============================================================================
|
| 34 |
+
% Title
|
| 35 |
+
% ============================================================================
|
| 36 |
+
\title{
|
| 37 |
+
\textbf{Julian: Efficient Training of a Bilingual 600M Parameter \\
|
| 38 |
+
Language Model on TPU with JAX}
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
\author{
|
| 42 |
+
Julian Kerignard \\
|
| 43 |
+
Independent Research \\
|
| 44 |
+
\texttt{github.com/JulianKrgd} \\
|
| 45 |
+
\texttt{huggingface.co/JulianKrgd}
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
\date{February 2026}
|
| 49 |
+
|
| 50 |
+
\begin{document}
|
| 51 |
+
\maketitle
|
| 52 |
+
|
| 53 |
+
% ============================================================================
|
| 54 |
+
% Abstract
|
| 55 |
+
% ============================================================================
|
| 56 |
+
\begin{abstract}
|
| 57 |
+
We present \textbf{Julian}\footnote{Models available on HuggingFace: \url{https://huggingface.co/JulianKrgd}}, a family of decoder-only language models ranging from 100M to 600M parameters, trained entirely from scratch on up to 39 billion tokens of bilingual English-French data using JAX/Flax on Google Cloud TPUs. Our largest model, Julian-600M, employs a modern transformer architecture with Rotary Position Embeddings (RoPE), SwiGLU activations, and RMSNorm, following the design principles of LLaMA. Despite being trained on significantly fewer tokens than comparable models, Julian-600M achieves 53.5\% normalized accuracy on HellaSwag, outperforming OPT-1.3B (41.5\%) which has over twice the parameters and was trained on 8$\times$ more data. We further fine-tune Julian-600M using supervised fine-tuning (SFT) on 2.47 million instruction-response pairs formatted with the ChatML template, producing instruction-following variants at 30K and 100K training steps. We provide a detailed account of our training infrastructure, data pipeline, and the challenges of multi-host TPU training with JAX. All model weights are released openly under the Apache 2.0 license on HuggingFace.
|
| 58 |
+
\end{abstract}
|
| 59 |
+
|
| 60 |
+
% ============================================================================
|
| 61 |
+
% 1. Introduction
|
| 62 |
+
% ============================================================================
|
| 63 |
+
\section{Introduction}
|
| 64 |
+
|
| 65 |
+
The rapid advancement of large language models (LLMs) has demonstrated remarkable capabilities in natural language understanding and generation \citep{brown2020language, chowdhery2023palm, touvron2023llama}. However, the training of such models typically requires enormous computational resources, often inaccessible to independent researchers and smaller organizations.
|
| 66 |
+
|
| 67 |
+
Recent work has shown that smaller language models, when trained with appropriate data and techniques, can achieve competitive performance on many benchmarks \citep{biderman2023pythia, zhang2022opt}. The Chinchilla scaling laws \citep{hoffmann2022training} further suggest that many models are undertrained relative to their size, and that optimal performance requires a careful balance between model size and training data volume.
|
| 68 |
+
|
| 69 |
+
In this work, we present \textbf{Julian}, a family of bilingual (English-French) language models trained from scratch using JAX/Flax on Google Cloud TPU v4-32 pods. Our contributions are:
|
| 70 |
+
|
| 71 |
+
\begin{enumerate}[leftmargin=*]
|
| 72 |
+
\item \textbf{Efficient training}: We train a 600M parameter model on 39B tokens that outperforms OPT-1.3B on HellaSwag despite using 2$\times$ fewer parameters and 8$\times$ fewer training tokens.
|
| 73 |
+
\item \textbf{Bilingual capability}: To the best of our knowledge, Julian is among the few openly released small language models trained from scratch on a mixture of English and French data (70\%/30\% ratio).
|
| 74 |
+
\item \textbf{Complete pipeline}: We describe the full training pipeline including data collection, tokenizer training, pre-training, supervised fine-tuning, and evaluation, providing a practical guide for training LLMs on TPU infrastructure.
|
| 75 |
+
\item \textbf{Open release}: All model weights, tokenizer, and training code are released under the Apache 2.0 license.
|
| 76 |
+
\end{enumerate}
|
| 77 |
+
|
| 78 |
+
% ============================================================================
|
| 79 |
+
% 2. Related Work
|
| 80 |
+
% ============================================================================
|
| 81 |
+
\section{Related Work}
|
| 82 |
+
|
| 83 |
+
\paragraph{Scaling Laws.}
|
| 84 |
+
\citet{kaplan2020scaling} established neural scaling laws showing power-law relationships between model size, dataset size, compute budget, and loss. \citet{hoffmann2022training} refined these findings with the Chinchilla scaling laws, demonstrating that many large models are significantly undertrained and that the optimal token-to-parameter ratio is approximately 20:1. Our Julian-600M model is trained on 39B tokens (65:1 ratio), exceeding the Chinchilla-optimal budget.
|
| 85 |
+
|
| 86 |
+
\paragraph{Open Language Models.}
|
| 87 |
+
GPT-2 \citep{radford2019language} pioneered the release of pre-trained language models, with sizes ranging from 124M to 1.5B parameters. OPT \citep{zhang2022opt} provided models from 125M to 175B parameters trained on 300B tokens with detailed training logs. Pythia \citep{biderman2023pythia} offered a suite of models from 70M to 12B parameters trained on 300B tokens from The Pile, specifically designed for studying model behavior during training. LLaMA \citep{touvron2023llama} introduced architectural improvements (RoPE, SwiGLU, RMSNorm) that have become standard in modern language models.
|
| 88 |
+
|
| 89 |
+
\paragraph{Small Language Models.}
|
| 90 |
+
TinyLlama \citep{zhang2024tinyllama} demonstrated that a 1.1B model trained on 3T tokens can achieve strong performance. MobileLLM \citep{liu2024mobilellm} explored architecture design for sub-billion parameter models. These works highlight the viability and growing interest in smaller, more efficient models.
|
| 91 |
+
|
| 92 |
+
\paragraph{Multilingual Models.}
|
| 93 |
+
While large multilingual models like mBERT \citep{devlin2019bert}, XLM-R \citep{conneau2020xlmr}, and BLOOM \citep{workshop2023bloom} cover many languages, few small models are specifically designed for bilingual English-French text generation from scratch.
|
| 94 |
+
|
| 95 |
+
% ============================================================================
|
| 96 |
+
% 3. Model Architecture
|
| 97 |
+
% ============================================================================
|
| 98 |
+
\section{Model Architecture}
|
| 99 |
+
|
| 100 |
+
Julian follows the LLaMA architecture \citep{touvron2023llama}: a decoder-only transformer with pre-normalization using RMSNorm \citep{zhang2019root}, SwiGLU feed-forward networks \citep{shazeer2020glu}, and Rotary Position Embeddings (RoPE) \citep{su2021roformer}. No bias terms are used in any linear projection.
|
| 101 |
+
|
| 102 |
+
\subsection{Architecture Details}
|
| 103 |
+
|
| 104 |
+
\begin{table}[h]
|
| 105 |
+
\centering
|
| 106 |
+
\caption{Julian model configurations. All models use RoPE ($\theta$=10000), SwiGLU, RMSNorm (pre-norm), and no bias terms.}
|
| 107 |
+
\label{tab:model_configs}
|
| 108 |
+
\begin{tabular}{lccc}
|
| 109 |
+
\toprule
|
| 110 |
+
\textbf{Parameter} & \textbf{Julian-100M} & \textbf{Julian-250M$^\dagger$} & \textbf{Julian-600M} \\
|
| 111 |
+
\midrule
|
| 112 |
+
Hidden size ($d_{\text{model}}$) & 640 & 1024 & 1280 \\
|
| 113 |
+
Layers ($L$) & 12 & 14 & 18 \\
|
| 114 |
+
Attention heads ($H$) & 10 & 16 & 20 \\
|
| 115 |
+
Head dimension ($d_h$) & 64 & 64 & 64 \\
|
| 116 |
+
FFN size ($d_{\text{ff}}$) & 2560 & 4096 & 5120 \\
|
| 117 |
+
Vocabulary size ($V$) & 50{,}000 & 50{,}000 & 50{,}000 \\
|
| 118 |
+
Context length & 2048 & 2048 & 2048 \\
|
| 119 |
+
Precision & bfloat16 & bfloat16 & bfloat16 \\
|
| 120 |
+
\bottomrule
|
| 121 |
+
\end{tabular}
|
| 122 |
+
\end{table}
|
| 123 |
+
|
| 124 |
+
\noindent{\small $^\dagger$ Julian-250M is currently in preparation and has not yet been trained.}
|
| 125 |
+
|
| 126 |
+
\paragraph{Rotary Position Embeddings (RoPE).}
|
| 127 |
+
We use RoPE \citep{su2021roformer} with base frequency $\theta = 10{,}000$. For each attention head, the query and key vectors are rotated by position-dependent angles:
|
| 128 |
+
\begin{equation}
|
| 129 |
+
f_{\theta}(x, m) = \begin{pmatrix} x_1 \\ x_2 \\ \vdots \\ x_{d-1} \\ x_d \end{pmatrix} \odot \begin{pmatrix} \cos(m\theta_1) \\ \cos(m\theta_1) \\ \vdots \\ \cos(m\theta_{d/2}) \\ \cos(m\theta_{d/2}) \end{pmatrix} + \begin{pmatrix} -x_2 \\ x_1 \\ \vdots \\ -x_d \\ x_{d-1} \end{pmatrix} \odot \begin{pmatrix} \sin(m\theta_1) \\ \sin(m\theta_1) \\ \vdots \\ \sin(m\theta_{d/2}) \\ \sin(m\theta_{d/2}) \end{pmatrix}
|
| 130 |
+
\end{equation}
|
| 131 |
+
where $\theta_i = \theta^{-2i/d}$ and $m$ is the position index.
|
| 132 |
+
|
| 133 |
+
\paragraph{SwiGLU Feed-Forward Network.}
|
| 134 |
+
Each transformer block uses a SwiGLU \citep{shazeer2020glu} feed-forward network:
|
| 135 |
+
\begin{equation}
|
| 136 |
+
\text{FFN}(x) = W_{\text{down}} \cdot (\text{SiLU}(W_{\text{gate}} x) \odot W_{\text{up}} x)
|
| 137 |
+
\end{equation}
|
| 138 |
+
where $W_{\text{gate}}, W_{\text{up}} \in \mathbb{R}^{d_{\text{ff}} \times d_{\text{model}}}$ and $W_{\text{down}} \in \mathbb{R}^{d_{\text{model}} \times d_{\text{ff}}}$. The SwiGLU activation introduces an additional projection compared to standard FFNs but improves quality at equivalent compute.
|
| 139 |
+
|
| 140 |
+
\paragraph{RMSNorm.}
|
| 141 |
+
We use Root Mean Square Layer Normalization \citep{zhang2019root} applied before each attention and feed-forward sub-layer (pre-norm architecture):
|
| 142 |
+
\begin{equation}
|
| 143 |
+
\text{RMSNorm}(x) = \frac{x}{\sqrt{\frac{1}{d}\sum_{i=1}^{d} x_i^2 + \epsilon}} \cdot \gamma
|
| 144 |
+
\end{equation}
|
| 145 |
+
where $\gamma$ is a learned scale parameter and $\epsilon = 10^{-6}$.
|
| 146 |
+
|
| 147 |
+
\subsection{Tokenizer}
|
| 148 |
+
|
| 149 |
+
We train a SentencePiece \citep{kudo2018sentencepiece} BPE tokenizer with a vocabulary of 50{,}000 tokens on a balanced sample of our training corpus. Key settings include:
|
| 150 |
+
\begin{itemize}[leftmargin=*]
|
| 151 |
+
\item Character coverage: 99.99\%
|
| 152 |
+
\item Byte fallback enabled (handles any UTF-8 input)
|
| 153 |
+
\item Special tokens: \texttt{<pad>} (0), \texttt{<unk>} (1), \texttt{<s>} (2), \texttt{</s>} (3), \texttt{<|code|>} (4), \texttt{<|endcode|>} (5), \texttt{<|im\_start|>} (6), \texttt{<|im\_end|>} (7)
|
| 154 |
+
\end{itemize}
|
| 155 |
+
|
| 156 |
+
The ChatML-style tokens (\texttt{<|im\_start|>} and \texttt{<|im\_end|>}) are included from the start of pre-training to support later instruction fine-tuning without vocabulary expansion.
|
| 157 |
+
|
| 158 |
+
% ============================================================================
|
| 159 |
+
% 4. Training Data
|
| 160 |
+
% ============================================================================
|
| 161 |
+
\section{Training Data}
|
| 162 |
+
|
| 163 |
+
\subsection{Data Sources}
|
| 164 |
+
|
| 165 |
+
We curate a bilingual training corpus of approximately 39 billion tokens with a 70\% English / 30\% French ratio. Table~\ref{tab:data_sources} lists our data sources.
|
| 166 |
+
|
| 167 |
+
\begin{table}[H]
|
| 168 |
+
\centering
|
| 169 |
+
\caption{Training data composition for Julian-600M (39B tokens).}
|
| 170 |
+
\label{tab:data_sources}
|
| 171 |
+
\begin{tabular}{lccc}
|
| 172 |
+
\toprule
|
| 173 |
+
\textbf{Source} & \textbf{Languages} & \textbf{Tokens (approx.)} & \textbf{Quality} \\
|
| 174 |
+
\midrule
|
| 175 |
+
Wikipedia & EN + FR & 5.5B & High \\
|
| 176 |
+
OSCAR 2301 & EN + FR & 15B & Medium \\
|
| 177 |
+
FineWeb-Edu & EN & 8B & Very High \\
|
| 178 |
+
Project Gutenberg & EN + FR & 1B & High \\
|
| 179 |
+
The Stack (code) & Multi & 2B & High \\
|
| 180 |
+
\midrule
|
| 181 |
+
\textbf{Total} & & \textbf{$\sim$39B} & \\
|
| 182 |
+
\bottomrule
|
| 183 |
+
\end{tabular}
|
| 184 |
+
\end{table}
|
| 185 |
+
|
| 186 |
+
\subsection{Data Processing Pipeline}
|
| 187 |
+
|
| 188 |
+
Our data processing pipeline consists of the following stages:
|
| 189 |
+
|
| 190 |
+
\begin{enumerate}[leftmargin=*]
|
| 191 |
+
\item \textbf{Download}: Raw data is obtained from HuggingFace datasets (OSCAR, FineWeb-Edu, The Stack), Wikipedia dumps, and Project Gutenberg mirrors.
|
| 192 |
+
\item \textbf{Cleaning}: Documents shorter than 100 characters or longer than 500K characters are removed. We enforce a minimum alphanumeric character ratio of 70\%.
|
| 193 |
+
\item \textbf{Deduplication}: MinHash Locality-Sensitive Hashing (LSH) with a Jaccard similarity threshold of 0.8 is used for near-duplicate removal.
|
| 194 |
+
\item \textbf{Language detection}: We use fastText language identification with a confidence threshold of 0.8 to ensure correct language labeling.
|
| 195 |
+
\item \textbf{Tokenization}: The cleaned corpus is tokenized using our SentencePiece tokenizer and packed into sequences of 2048 tokens.
|
| 196 |
+
\item \textbf{Sharding}: The tokenized data is split into 359 shards stored on Google Cloud Storage (GCS) for streaming during training.
|
| 197 |
+
\end{enumerate}
|
| 198 |
+
|
| 199 |
+
% ============================================================================
|
| 200 |
+
% 5. Training Procedure
|
| 201 |
+
% ============================================================================
|
| 202 |
+
\section{Training Procedure}
|
| 203 |
+
|
| 204 |
+
\subsection{Infrastructure}
|
| 205 |
+
|
| 206 |
+
All training is conducted on Google Cloud TPU v4-32 pods (32 TPU chips across 4 hosts) provided through the TPU Research Cloud (TRC) program. We use the JAX \citep{bradbury2018jax} framework with Flax for model definition and Optax for optimization.
|
| 207 |
+
|
| 208 |
+
\subsection{Parallelism Strategy}
|
| 209 |
+
|
| 210 |
+
We employ Fully Sharded Data Parallelism (FSDP) \citep{xu2021gspmd} across the 32 TPU chips using JAX's \texttt{pmap} primitive. Model parameters are replicated across all devices, while the batch dimension is sharded. Gradient accumulation over 8 micro-steps yields an effective batch size of 1024 sequences. All computations use bfloat16 mixed precision \citep{micikevicius2018mixed} for both forward and backward passes, with optimizer states also stored in bfloat16.
|
| 211 |
+
|
| 212 |
+
\subsection{Optimizer and Schedule}
|
| 213 |
+
|
| 214 |
+
We use AdamW \citep{loshchilov2019decoupled} with the following configuration. The total compute budget for Julian-600M is approximately $2.4 \times 10^{19}$ FLOPs (estimated as $6 \times N \times D$ where $N = 600\text{M}$ parameters and $D = 39\text{B}$ tokens). Training was completed in approximately 21 days of wall-clock time on a single TPU v4-32 pod, achieving a Model FLOPs Utilization (MFU) of approximately 38\%.
|
| 215 |
+
|
| 216 |
+
\begin{table}[h]
|
| 217 |
+
\centering
|
| 218 |
+
\caption{Pre-training hyperparameters for Julian-600M.}
|
| 219 |
+
\label{tab:hyperparams}
|
| 220 |
+
\begin{tabular}{lc}
|
| 221 |
+
\toprule
|
| 222 |
+
\textbf{Hyperparameter} & \textbf{Value} \\
|
| 223 |
+
\midrule
|
| 224 |
+
Optimizer & AdamW \\
|
| 225 |
+
$\beta_1$, $\beta_2$ & 0.9, 0.95 \\
|
| 226 |
+
$\epsilon$ & $10^{-8}$ \\
|
| 227 |
+
Weight decay & 0.1 \\
|
| 228 |
+
Peak learning rate & $1.2 \times 10^{-3}$ \\
|
| 229 |
+
Minimum learning rate & $1.2 \times 10^{-4}$ (10\% of peak) \\
|
| 230 |
+
Warmup steps & 3{,}000 \\
|
| 231 |
+
Total steps & 300{,}000 \\
|
| 232 |
+
LR schedule & Cosine annealing \\
|
| 233 |
+
Gradient clipping & 1.0 (global norm) \\
|
| 234 |
+
Batch size (per device) & 4 \\
|
| 235 |
+
Gradient accumulation steps & 8 \\
|
| 236 |
+
Effective batch size & 1{,}024 \\
|
| 237 |
+
Sequence length & 2{,}048 \\
|
| 238 |
+
Tokens per step & $\sim$2.1M \\
|
| 239 |
+
Total tokens & $\sim$39B \\
|
| 240 |
+
Precision & bfloat16 \\
|
| 241 |
+
\bottomrule
|
| 242 |
+
\end{tabular}
|
| 243 |
+
\end{table}
|
| 244 |
+
|
| 245 |
+
We follow the Chinchilla cosine learning rate schedule \citep{hoffmann2022training}: linear warmup from 0 to the peak learning rate over 3{,}000 steps, followed by cosine decay to 10\% of the peak value. Optimizer states ($\mu$ and $\nu$) are stored in bfloat16 to reduce memory consumption by approximately 40\%.
|
| 246 |
+
|
| 247 |
+
\subsection{Robustness}
|
| 248 |
+
|
| 249 |
+
Training on preemptible TPU instances requires robust checkpoint management. We implement:
|
| 250 |
+
\begin{itemize}[leftmargin=*]
|
| 251 |
+
\item \textbf{Asynchronous checkpointing} using Orbax, saving every 10{,}000 steps without blocking training.
|
| 252 |
+
\item \textbf{SIGTERM handler}: On preemption, an emergency checkpoint is written within the 30-second grace period.
|
| 253 |
+
\item \textbf{Health monitoring}: Automatic detection of NaN/Inf values in gradients and loss, with circuit-breaker logic for retries.
|
| 254 |
+
\item \textbf{Global synchronization}: JAX barrier synchronization before checkpoint writes to ensure multi-host consistency.
|
| 255 |
+
\end{itemize}
|
| 256 |
+
|
| 257 |
+
% ============================================================================
|
| 258 |
+
% 6. Supervised Fine-Tuning
|
| 259 |
+
% ============================================================================
|
| 260 |
+
\section{Supervised Fine-Tuning}
|
| 261 |
+
|
| 262 |
+
We perform supervised fine-tuning (SFT) on the pre-trained Julian-600M checkpoint (step 300{,}000) using a large instruction-following dataset.
|
| 263 |
+
|
| 264 |
+
\subsection{Instruction Dataset}
|
| 265 |
+
|
| 266 |
+
Our SFT dataset comprises 2.47 million instruction-response pairs drawn from multiple sources:
|
| 267 |
+
|
| 268 |
+
\begin{table}[H]
|
| 269 |
+
\centering
|
| 270 |
+
\caption{SFT dataset composition.}
|
| 271 |
+
\label{tab:sft_data}
|
| 272 |
+
\begin{tabular}{lcc}
|
| 273 |
+
\toprule
|
| 274 |
+
\textbf{Source} & \textbf{Examples (approx.)} & \textbf{Language} \\
|
| 275 |
+
\midrule
|
| 276 |
+
Stanford Alpaca & 52K & English \\
|
| 277 |
+
Databricks Dolly 15K & 15K & English \\
|
| 278 |
+
Code Alpaca & 20K & English \\
|
| 279 |
+
GPT4All-J & 20K & English \\
|
| 280 |
+
French instruction data & 15K+ & French \\
|
| 281 |
+
OpenHermes 2.5 (synthetic) & $\sim$900K & English \\
|
| 282 |
+
SlimOrca & $\sim$500K & English \\
|
| 283 |
+
Other open-source instruction data & $\sim$900K & Multilingual \\
|
| 284 |
+
\midrule
|
| 285 |
+
\textbf{Total} & \textbf{2.47M} & \\
|
| 286 |
+
\bottomrule
|
| 287 |
+
\end{tabular}
|
| 288 |
+
\end{table}
|
| 289 |
+
|
| 290 |
+
\subsection{ChatML Format}
|
| 291 |
+
|
| 292 |
+
All instruction data is formatted using the ChatML template \citep{openai2023chatml}:
|
| 293 |
+
|
| 294 |
+
\smallskip\noindent\begin{minipage}{\textwidth}
|
| 295 |
+
\begin{Verbatim}[fontsize=\small, vspace=0pt]
|
| 296 |
+
<|im_start|>system
|
| 297 |
+
You are a helpful assistant.<|im_end|>
|
| 298 |
+
<|im_start|>user
|
| 299 |
+
{instruction}<|im_end|>
|
| 300 |
+
<|im_start|>assistant
|
| 301 |
+
{response}<|im_end|>
|
| 302 |
+
\end{Verbatim}
|
| 303 |
+
\end{minipage}
|
| 304 |
+
\smallskip\noindent During SFT, loss is computed only on assistant response tokens using a binary loss mask. System and user tokens receive zero loss weight, ensuring the model learns to generate responses rather than memorizing prompts.
|
| 305 |
+
|
| 306 |
+
\subsection{SFT Hyperparameters}
|
| 307 |
+
|
| 308 |
+
\begin{table}[h]
|
| 309 |
+
\centering
|
| 310 |
+
\caption{SFT training hyperparameters.}
|
| 311 |
+
\label{tab:sft_hyperparams}
|
| 312 |
+
\begin{tabular}{lc}
|
| 313 |
+
\toprule
|
| 314 |
+
\textbf{Hyperparameter} & \textbf{Value} \\
|
| 315 |
+
\midrule
|
| 316 |
+
Base checkpoint & step 300{,}000 (39B tokens) \\
|
| 317 |
+
Learning rate & $2 \times 10^{-5}$ \\
|
| 318 |
+
Warmup steps & 1{,}000 \\
|
| 319 |
+
Batch size (effective) & 32--256 \\
|
| 320 |
+
Sequence length & 2{,}048 \\
|
| 321 |
+
Weight decay & 0.01 \\
|
| 322 |
+
Gradient clipping & 1.0 \\
|
| 323 |
+
\bottomrule
|
| 324 |
+
\end{tabular}
|
| 325 |
+
\end{table}
|
| 326 |
+
|
| 327 |
+
We train two SFT variants:
|
| 328 |
+
\begin{itemize}[leftmargin=*]
|
| 329 |
+
\item \textbf{SFT-30K}: 30{,}000 steps, approximately 2B tokens seen, final loss 1.86
|
| 330 |
+
\item \textbf{SFT-100K}: 100{,}000 steps, approximately 6.5B tokens seen ($\sim$2.2 epochs), final loss 1.69
|
| 331 |
+
\end{itemize}
|
| 332 |
+
|
| 333 |
+
An earlier variant, \textbf{Julian-600M-10B-Instruct-v0.1}, was fine-tuned from an intermediate pre-training checkpoint (step 170{,}000, $\sim$10B tokens) on a smaller instruction dataset ($\sim$185K examples). This variant serves as a baseline for comparison.
|
| 334 |
+
|
| 335 |
+
% ============================================================================
|
| 336 |
+
% 7. Evaluation
|
| 337 |
+
% ============================================================================
|
| 338 |
+
\section{Evaluation}
|
| 339 |
+
|
| 340 |
+
\subsection{Benchmark Suite}
|
| 341 |
+
|
| 342 |
+
We evaluate all Julian models on standard zero-shot benchmarks using the Language Model Evaluation Harness \citep{gao2023framework}:
|
| 343 |
+
|
| 344 |
+
\begin{itemize}[leftmargin=*]
|
| 345 |
+
\item \textbf{HellaSwag} \citep{zellers2019hellaswag}: Commonsense natural language inference (acc\_norm)
|
| 346 |
+
\item \textbf{PIQA} \citep{bisk2020piqa}: Physical intuition QA (acc)
|
| 347 |
+
\item \textbf{LAMBADA} \citep{paperno2016lambada}: Word prediction requiring broad context (acc, perplexity)
|
| 348 |
+
\item \textbf{ARC-Easy / ARC-Challenge} \citep{clark2018think}: Science question answering (acc / acc\_norm)
|
| 349 |
+
\item \textbf{WinoGrande} \citep{sakaguchi2020winogrande}: Commonsense coreference resolution (acc)
|
| 350 |
+
\item \textbf{BoolQ} \citep{clark2019boolq}: Yes/no question answering (acc)
|
| 351 |
+
\end{itemize}
|
| 352 |
+
|
| 353 |
+
\subsection{Evaluation Infrastructure}
|
| 354 |
+
|
| 355 |
+
Because standard lm-eval with HuggingFace models defaults to PyTorch on CPU when run on TPU VMs (no CUDA available), we implement a custom JAX-based evaluation wrapper that performs inference directly on TPU. This achieves approximately 5.8 items/second with batch size 48, completing the full evaluation suite ($\sim$72K requests) in approximately 3.5 hours on a single TPU v4-32 pod.
|
| 356 |
+
|
| 357 |
+
% ============================================================================
|
| 358 |
+
% 8. Results
|
| 359 |
+
% ============================================================================
|
| 360 |
+
\section{Results}
|
| 361 |
+
|
| 362 |
+
\subsection{Julian Model Progression}
|
| 363 |
+
|
| 364 |
+
Table~\ref{tab:julian_results} presents the benchmark results across Julian model variants, illustrating the impact of additional pre-training and supervised fine-tuning.
|
| 365 |
+
|
| 366 |
+
\begin{table}[h]
|
| 367 |
+
\centering
|
| 368 |
+
\caption{Benchmark results (0-shot) for Julian model variants. Bold indicates best within Julian models for each benchmark.}
|
| 369 |
+
\label{tab:julian_results}
|
| 370 |
+
\begin{tabular}{lccccccc}
|
| 371 |
+
\toprule
|
| 372 |
+
\textbf{Model} & \textbf{HS} & \textbf{PIQA} & \textbf{LAM.} & \textbf{ARC-E} & \textbf{ARC-C} & \textbf{WG} & \textbf{BoolQ} \\
|
| 373 |
+
\midrule
|
| 374 |
+
Julian-600M Base & \textbf{53.5} & \textbf{66.8} & 37.3 & --- & --- & --- & --- \\
|
| 375 |
+
Julian-600M SFT-30K & 41.7 & \textbf{66.8} & \textbf{37.7} & 53.5 & \textbf{27.1} & \textbf{53.8} & 60.6 \\
|
| 376 |
+
Julian-600M SFT-100K & 41.6 & 66.6 & \textbf{37.7} & \textbf{53.8} & 26.7 & 52.8 & \textbf{60.8} \\
|
| 377 |
+
Julian-600M-10B-v0.1 & 42.7 & 66.2 & 34.6 & --- & --- & --- & --- \\
|
| 378 |
+
\bottomrule
|
| 379 |
+
\end{tabular}
|
| 380 |
+
\end{table}
|
| 381 |
+
|
| 382 |
+
\paragraph{SFT Impact.} Supervised fine-tuning causes a notable drop in HellaSwag accuracy ($-$11.8 points), consistent with observations in other models where instruction tuning trades benchmark performance for instruction-following capability. Other benchmarks remain largely stable, with slight improvements in LAMBADA, ARC-Easy, and BoolQ.
|
| 383 |
+
|
| 384 |
+
\paragraph{SFT-30K vs SFT-100K.} The two SFT variants produce near-identical results, suggesting that 30K steps is sufficient for this dataset size. At 100K steps ($\sim$2.2 epochs), WinoGrande begins to degrade, likely due to overfitting.
|
| 385 |
+
|
| 386 |
+
\subsection{Comparison with Existing Models}
|
| 387 |
+
|
| 388 |
+
Table~\ref{tab:comparison} compares Julian-600M with publicly available models of similar or larger scale.
|
| 389 |
+
|
| 390 |
+
\begin{table}[h]
|
| 391 |
+
\centering
|
| 392 |
+
\caption{Comparison with existing models (0-shot). Julian-600M Base outperforms OPT-1.3B on HellaSwag despite 2$\times$ fewer parameters and 8$\times$ fewer training tokens.}
|
| 393 |
+
\label{tab:comparison}
|
| 394 |
+
\resizebox{\textwidth}{!}{
|
| 395 |
+
\begin{tabular}{lccccccccc}
|
| 396 |
+
\toprule
|
| 397 |
+
\textbf{Model} & \textbf{Params} & \textbf{Tokens} & \textbf{HS} & \textbf{PIQA} & \textbf{LAM.} & \textbf{ARC-E} & \textbf{ARC-C} & \textbf{WG} \\
|
| 398 |
+
\midrule
|
| 399 |
+
GPT-2 Small & 124M & 100B+ & 31.5 & --- & 46.0 & --- & --- & 50.4 \\
|
| 400 |
+
OPT-125M & 125M & 300B & 29.2 & 63.0 & 37.9 & 43.5 & 18.9 & 50.3 \\
|
| 401 |
+
OPT-350M & 331M & 300B & 32.0 & 64.4 & 45.2 & 44.0 & 20.7 & 52.3 \\
|
| 402 |
+
Pythia-410M & 405M & 300B & 33.3 & 66.8 & 50.5 & 50.4 & 21.3 & 53.0 \\
|
| 403 |
+
\midrule
|
| 404 |
+
\textbf{Julian-600M Base} & \textbf{600M} & \textbf{39B} & \textbf{53.5} & \textbf{66.8} & \textbf{37.3} & --- & --- & --- \\
|
| 405 |
+
\textbf{Julian-600M SFT-30K} & \textbf{600M} & \textbf{39B+2B} & \textbf{41.7} & \textbf{66.8} & \textbf{37.7} & \textbf{53.5} & \textbf{27.1} & \textbf{53.8} \\
|
| 406 |
+
\midrule
|
| 407 |
+
GPT-2 XL & 1{,}558M & 100B+ & 50.9 & 70.8 & 63.2 & --- & --- & 59.4 \\
|
| 408 |
+
Pythia-1B & 1B & 300B & 37.6 & 70.5 & 56.6 & 55.9 & 24.3 & 54.5 \\
|
| 409 |
+
OPT-1.3B & 1.3B & 300B & 41.5 & 71.7 & 57.9 & 57.0 & 23.4 & 59.5 \\
|
| 410 |
+
\bottomrule
|
| 411 |
+
\end{tabular}
|
| 412 |
+
}
|
| 413 |
+
\end{table}
|
| 414 |
+
|
| 415 |
+
\paragraph{Key Findings.}
|
| 416 |
+
|
| 417 |
+
\begin{itemize}[leftmargin=*]
|
| 418 |
+
\item \textbf{HellaSwag}: Julian-600M Base achieves 53.5\%, surpassing GPT-2~XL (50.9\%, 1.5B params), OPT-1.3B (41.5\%), and Pythia-1B (37.6\%). This is a remarkable result for a 600M model trained on only 39B tokens.
|
| 419 |
+
\item \textbf{PIQA}: Julian-600M matches Pythia-410M at 66.8\% and falls only slightly below models 2--3$\times$ larger.
|
| 420 |
+
\item \textbf{LAMBADA}: Julian-600M achieves 37.3\%, lower than similarly-sized models trained on more data. This likely reflects the smaller training corpus, as LAMBADA is particularly sensitive to the volume and diversity of training text.
|
| 421 |
+
\item \textbf{Tokens efficiency}: Julian-600M achieves its HellaSwag score with 39B tokens, while OPT and Pythia models were trained on 300B tokens (7.7$\times$ more).
|
| 422 |
+
\end{itemize}
|
| 423 |
+
|
| 424 |
+
\begin{figure}[t]
|
| 425 |
+
\centering
|
| 426 |
+
\begin{tikzpicture}
|
| 427 |
+
\begin{axis}[
|
| 428 |
+
xbar,
|
| 429 |
+
bar width=7pt,
|
| 430 |
+
width=0.88\textwidth,
|
| 431 |
+
height=6cm,
|
| 432 |
+
xlabel={HellaSwag (acc\_norm, \%)},
|
| 433 |
+
ytick={0,1,2,3,4,5,6,7},
|
| 434 |
+
yticklabels={
|
| 435 |
+
{OPT-125M {\scriptsize(125M, 300B tok)}},
|
| 436 |
+
{GPT-2 Small {\scriptsize(124M, 100B+ tok)}},
|
| 437 |
+
{OPT-350M {\scriptsize(331M, 300B tok)}},
|
| 438 |
+
{Pythia-410M {\scriptsize(405M, 300B tok)}},
|
| 439 |
+
{Pythia-1B {\scriptsize(1B, 300B tok)}},
|
| 440 |
+
{OPT-1.3B {\scriptsize(1.3B, 300B tok)}},
|
| 441 |
+
{GPT-2 XL {\scriptsize(1.5B, 100B+ tok)}},
|
| 442 |
+
{\textbf{Julian-600M} {\scriptsize\textbf{(600M, 39B tok)}}}
|
| 443 |
+
},
|
| 444 |
+
xmin=25, xmax=58,
|
| 445 |
+
nodes near coords,
|
| 446 |
+
nodes near coords style={font=\scriptsize, anchor=west},
|
| 447 |
+
enlarge y limits=0.1,
|
| 448 |
+
xmajorgrids=true,
|
| 449 |
+
grid style={gray!20},
|
| 450 |
+
y tick label style={font=\footnotesize},
|
| 451 |
+
]
|
| 452 |
+
\addplot[fill=gray!40, draw=gray!60] coordinates {
|
| 453 |
+
(29.2,0) (31.5,1) (32.0,2) (33.3,3) (37.6,4) (41.5,5) (50.9,6) (53.5,7)
|
| 454 |
+
};
|
| 455 |
+
\end{axis}
|
| 456 |
+
\end{tikzpicture}
|
| 457 |
+
\caption{HellaSwag accuracy (acc\_norm) across models, sorted by score. Numbers in parentheses indicate parameter count and training data volume. Julian-600M achieves the highest score despite having fewer parameters and significantly less training data than most comparison models.}
|
| 458 |
+
\label{fig:hellaswag_comparison}
|
| 459 |
+
\end{figure}
|
| 460 |
+
|
| 461 |
+
% ============================================================================
|
| 462 |
+
% 9. Interpretation of Results
|
| 463 |
+
% ============================================================================
|
| 464 |
+
\section{Interpretation of Results}
|
| 465 |
+
|
| 466 |
+
This section provides an in-depth analysis of the results presented above, examining pre-training dynamics, the impact of SFT, and the saturation phenomena observed.
|
| 467 |
+
|
| 468 |
+
\subsection{Pre-training Progression}
|
| 469 |
+
|
| 470 |
+
The evolution of performance between the two pre-training checkpoints reveals sustained learning dynamics. Between the 10B token checkpoint (step 100{,}000) and the final 39B token checkpoint (step 300{,}000), we observe:
|
| 471 |
+
|
| 472 |
+
\begin{itemize}[leftmargin=*]
|
| 473 |
+
\item \textbf{HellaSwag}: 45.8\% $\rightarrow$ 53.5\% (+7.7 points)
|
| 474 |
+
\item \textbf{Loss}: 3.20 $\rightarrow$ 2.33 ($-$27\%)
|
| 475 |
+
\item \textbf{PIQA}: 67.6\% $\rightarrow$ 66.8\% ($-$0.8 point)
|
| 476 |
+
\item \textbf{LAMBADA}: 35.0\% $\rightarrow$ 37.3\% (+2.3 points)
|
| 477 |
+
\end{itemize}
|
| 478 |
+
|
| 479 |
+
The +7.7 point improvement on HellaSwag is particularly significant. This benchmark measures commonsense reasoning, and the continued improvement suggests that the model has not reached its maximum learning capacity at 39B tokens. The loss continuing to decrease substantially (from 3.20 to 2.33) confirms the absence of saturation: the model continues to learn effectively at each additional training step. PIQA remains stable, while LAMBADA shows a modest but encouraging improvement. Extrapolating this trajectory, continued training beyond 39B tokens would likely yield further gains, particularly on LAMBADA where Julian-600M remains behind models trained on 300B tokens.
|
| 480 |
+
|
| 481 |
+
\subsection{Impact of SFT on Benchmarks}
|
| 482 |
+
|
| 483 |
+
Supervised fine-tuning fundamentally transforms the model's behavior: from a text completer that statistically predicts the next token, it becomes an assistant capable of responding to structured instructions. This transformation has a measurable cost on benchmarks.
|
| 484 |
+
|
| 485 |
+
\paragraph{The HellaSwag sacrifice.} The most notable drop is on HellaSwag: $-$11.8 points (53.5\% $\rightarrow$ 41.7\%). This phenomenon is well documented in the literature \citep{ouyang2022training} and is explained by the very nature of SFT. HellaSwag measures the model's ability to naturally complete a text; however, SFT reorients the model toward producing responses in a specific conversational format (ChatML). The model partially ``unlearns'' free completion in favor of instruction following. This is an expected and generally accepted trade-off.
|
| 486 |
+
|
| 487 |
+
\paragraph{Reasoning stability.} In contrast, benchmarks measuring reasoning are remarkably stable after SFT:
|
| 488 |
+
\begin{itemize}[leftmargin=*]
|
| 489 |
+
\item \textbf{PIQA} stays at 66.8\% (identical to the base model), indicating that physical intuition is unaffected.
|
| 490 |
+
\item \textbf{WinoGrande} reaches 53.8\%, comparable to reference models of similar size.
|
| 491 |
+
\item \textbf{BoolQ} reaches 60.6\%, within the expected range for a 600M model.
|
| 492 |
+
\end{itemize}
|
| 493 |
+
|
| 494 |
+
These results suggest that SFT does not alter the model's underlying reasoning capabilities but primarily modifies the output distribution (the format of generated responses).
|
| 495 |
+
|
| 496 |
+
\paragraph{LAMBADA improvement.} Notably, LAMBADA slightly improves after SFT (+0.4 points, from 37.3\% to 37.7\%). This counterintuitive result can be explained by the fact that the instruction-response format encourages the model to better exploit provided context to produce a precise answer---exactly what LAMBADA measures (predicting a word from a long context).
|
| 497 |
+
|
| 498 |
+
\subsection{Over-SFT: Quantitative Analysis (30K vs 100K)}
|
| 499 |
+
|
| 500 |
+
The comparison between SFT-30K and SFT-100K constitutes one of the most instructive findings of this work. Table~\ref{tab:sft_delta} presents the detailed differences.
|
| 501 |
+
|
| 502 |
+
\begin{table}[H]
|
| 503 |
+
\centering
|
| 504 |
+
\caption{Detailed comparison between SFT-30K and SFT-100K. $\Delta$ represents the difference (100K $-$ 30K). SFT-100K uses 3.3$\times$ more compute for nearly identical results.}
|
| 505 |
+
\label{tab:sft_delta}
|
| 506 |
+
\begin{tabular}{lccccc}
|
| 507 |
+
\toprule
|
| 508 |
+
\textbf{Benchmark} & \textbf{SFT-30K} & \textbf{SFT-100K} & \textbf{$\Delta$} & \textbf{SFT Tokens} & \textbf{Epochs} \\
|
| 509 |
+
\midrule
|
| 510 |
+
Loss & 1.86 & 1.69 & $-$0.17 & --- & --- \\
|
| 511 |
+
HellaSwag & 41.7\% & 41.6\% & $-$0.1 & --- & --- \\
|
| 512 |
+
PIQA & 66.8\% & 66.6\% & $-$0.2 & --- & --- \\
|
| 513 |
+
LAMBADA & 37.7\% & 37.7\% & 0.0 & --- & --- \\
|
| 514 |
+
ARC-Easy & 53.5\% & 53.8\% & +0.3 & --- & --- \\
|
| 515 |
+
ARC-Challenge & 27.1\% & 26.7\% & $-$0.4 & --- & --- \\
|
| 516 |
+
WinoGrande & 53.8\% & 52.8\% & \textbf{$-$1.0} & --- & --- \\
|
| 517 |
+
BoolQ & 60.6\% & 60.8\% & +0.2 & --- & --- \\
|
| 518 |
+
\midrule
|
| 519 |
+
& & & & 1.97B vs 6.55B & 0.66 vs 2.20 \\
|
| 520 |
+
\bottomrule
|
| 521 |
+
\end{tabular}
|
| 522 |
+
\end{table}
|
| 523 |
+
|
| 524 |
+
\begin{figure}[t]
|
| 525 |
+
\centering
|
| 526 |
+
\begin{tikzpicture}
|
| 527 |
+
\begin{axis}[
|
| 528 |
+
ybar=8pt,
|
| 529 |
+
bar width=12pt,
|
| 530 |
+
width=\textwidth,
|
| 531 |
+
height=6.5cm,
|
| 532 |
+
ylabel={Accuracy (\%)},
|
| 533 |
+
symbolic x coords={HellaSwag, PIQA, LAMBADA},
|
| 534 |
+
xtick=data,
|
| 535 |
+
ymin=30, ymax=72,
|
| 536 |
+
nodes near coords,
|
| 537 |
+
nodes near coords style={font=\scriptsize, /pgf/number format/fixed, /pgf/number format/precision=1, anchor=south},
|
| 538 |
+
legend style={at={(0.5,-0.15)}, anchor=north, legend columns=3, font=\small},
|
| 539 |
+
enlarge x limits=0.35,
|
| 540 |
+
ymajorgrids=true,
|
| 541 |
+
grid style={gray!15},
|
| 542 |
+
]
|
| 543 |
+
\addplot[fill=blue!25, draw=blue!50] coordinates {
|
| 544 |
+
(HellaSwag, 53.5) (PIQA, 66.8) (LAMBADA, 37.3)
|
| 545 |
+
};
|
| 546 |
+
\addplot[fill=orange!30, draw=orange!55] coordinates {
|
| 547 |
+
(HellaSwag, 41.7) (PIQA, 66.8) (LAMBADA, 37.7)
|
| 548 |
+
};
|
| 549 |
+
\addplot[fill=red!20, draw=red!45] coordinates {
|
| 550 |
+
(HellaSwag, 41.6) (PIQA, 66.6) (LAMBADA, 37.7)
|
| 551 |
+
};
|
| 552 |
+
\legend{Base 39B, SFT-30K (0.66 ep.), SFT-100K (2.2 ep.)}
|
| 553 |
+
\end{axis}
|
| 554 |
+
\end{tikzpicture}
|
| 555 |
+
\caption{Impact of supervised fine-tuning on benchmark performance. SFT causes a significant HellaSwag drop ($-$11.8 points) while preserving PIQA and slightly improving LAMBADA. SFT-30K and SFT-100K achieve near-identical results despite 3.3$\times$ difference in compute, indicating clear saturation.}
|
| 556 |
+
\label{fig:sft_impact}
|
| 557 |
+
\end{figure}
|
| 558 |
+
|
| 559 |
+
\paragraph{Loss is not a good SFT quality indicator.} The most striking result is the disconnect between loss and benchmark performance. The loss drops significantly from 1.86 to 1.69 ($-$9\%), but benchmarks stagnate or degrade. This reveals that the model learns to better reproduce the \emph{format} of the SFT dataset responses (lower loss on response tokens) without improving its underlying \emph{knowledge} or \emph{reasoning} capabilities. In other words, the model becomes more fluent in the ChatML format without becoming more capable.
|
| 560 |
+
|
| 561 |
+
\paragraph{Overfitting signal: WinoGrande.} The degradation of WinoGrande from 53.8\% to 52.8\% ($-$1.0 point) is the clearest overfitting signal. WinoGrande tests commonsense reasoning on ambiguous pronoun resolution, a capability that should not degrade with additional training if the model were generalizing correctly. With 2.47M examples and 2.2 epochs, each example in the SFT dataset has been seen on average more than 2 times. The model begins to memorize dataset-specific patterns rather than generalize, which harms its general reasoning ability.
|
| 562 |
+
|
| 563 |
+
\paragraph{ARC-Challenge confirms the trend.} The drop in ARC-Challenge ($-$0.4 points) points in the same direction. This benchmark tests scientific reasoning on difficult questions, and its parallel degradation with WinoGrande reinforces the hypothesis of overfitting that specifically impacts reasoning capabilities.
|
| 564 |
+
|
| 565 |
+
\paragraph{Practical implication.} For a dataset of 2.47M examples with a batch size of 32, one epoch corresponds to 45{,}383 steps. SFT-30K (0.66 epochs) has not yet completed a full pass through the dataset but already achieves optimal performance. The additional compute of SFT-100K (3.3$\times$ more) is therefore largely wasted.
|
| 566 |
+
|
| 567 |
+
\subsection{Importance of the Base Checkpoint}
|
| 568 |
+
|
| 569 |
+
The comparison between the different fine-tuned variants reveals an apparent paradox:
|
| 570 |
+
|
| 571 |
+
\begin{itemize}[leftmargin=*]
|
| 572 |
+
\item \textbf{Instruct v0.1} (base 10B tokens, 5{,}500 SFT steps, 185K examples): HellaSwag = 42.7\%
|
| 573 |
+
\item \textbf{SFT-30K} (base 39B tokens, 30{,}000 SFT steps, 2.47M examples): HellaSwag = 41.7\%
|
| 574 |
+
\end{itemize}
|
| 575 |
+
|
| 576 |
+
The model fine-tuned from a weaker base (10B tokens) achieves a higher post-SFT HellaSwag (+1.0 point) than the one fine-tuned from the stronger base (39B tokens). Several factors may explain this result:
|
| 577 |
+
|
| 578 |
+
\begin{enumerate}[leftmargin=*]
|
| 579 |
+
\item \textbf{Different SFT datasets}: Instruct v0.1 uses 185K examples (likely of higher individual quality), while SFT-30K uses 2.47M examples (more diversity but potentially more noise). The quality of SFT examples has a direct impact on benchmark degradation.
|
| 580 |
+
\item \textbf{Different SFT duration}: 5{,}500 steps represent a much lighter SFT exposure than 30{,}000 steps, which preserves more of the base model's capabilities. With fewer steps, the model ``forgets'' less of its text completion abilities.
|
| 581 |
+
\item \textbf{Different loss surfaces}: The model at 10B tokens is in a different training regime (loss 3.20 vs 2.33), which may influence how SFT modifies the weights---a model with higher loss may be more ``malleable'' to SFT.
|
| 582 |
+
\end{enumerate}
|
| 583 |
+
|
| 584 |
+
This result underscores that post-SFT quality is not a simple function of the base checkpoint: the combination of base checkpoint, SFT dataset, and SFT duration forms a three-dimensional hyperparameter space that should be optimized jointly.
|
| 585 |
+
|
| 586 |
+
\subsection{Practical Recommendations}
|
| 587 |
+
|
| 588 |
+
Based on the entirety of our observations, we formulate the following recommendations for fine-tuning small language models (under 1B parameters):
|
| 589 |
+
|
| 590 |
+
\begin{enumerate}[leftmargin=*]
|
| 591 |
+
\item \textbf{Limit SFT to less than 1 epoch}: For datasets on the order of millions of examples, 0.5--0.7 epochs appears optimal. Beyond that, the risk of overfitting increases with no measurable benefit on benchmarks.
|
| 592 |
+
\item \textbf{Monitor WinoGrande and ARC-Challenge}: These two benchmarks are the first to show signs of overfitting during SFT. A degradation of these metrics is a more reliable stopping signal than training loss.
|
| 593 |
+
\item \textbf{Do not trust loss for SFT quality}: Unlike pre-training where loss is a reliable indicator of model quality, SFT loss primarily measures format compliance, not reasoning quality.
|
| 594 |
+
\item \textbf{Prefer diversity over volume}: A high-quality SFT dataset with diverse examples is preferable to a large noisy dataset trained over multiple epochs.
|
| 595 |
+
\item \textbf{Invest in pre-training}: The progression from 45.8\% to 53.5\% on HellaSwag shows that additional pre-training yields gains that far exceed those from increasing SFT.
|
| 596 |
+
\end{enumerate}
|
| 597 |
+
|
| 598 |
+
% ============================================================================
|
| 599 |
+
% 10. Analysis
|
| 600 |
+
% ============================================================================
|
| 601 |
+
\section{Analysis}
|
| 602 |
+
|
| 603 |
+
\subsection{Training Efficiency}
|
| 604 |
+
|
| 605 |
+
The strong HellaSwag performance of Julian-600M despite limited training data suggests that our architecture and training procedure are highly efficient. We hypothesize several contributing factors:
|
| 606 |
+
|
| 607 |
+
\begin{enumerate}[leftmargin=*]
|
| 608 |
+
\item \textbf{Modern architecture}: The combination of RoPE, SwiGLU, and RMSNorm (as in LLaMA) provides better inductive biases than the architectures used in GPT-2 and OPT (learned positional embeddings, standard FFN, LayerNorm).
|
| 609 |
+
\item \textbf{Data quality}: FineWeb-Edu and Wikipedia provide high-quality, factual training data, potentially offering more ``learning per token'' than noisier web crawls.
|
| 610 |
+
\item \textbf{Bilingual training}: Exposure to both English and French may provide cross-lingual transfer benefits, particularly for commonsense reasoning tasks.
|
| 611 |
+
\end{enumerate}
|
| 612 |
+
|
| 613 |
+
\begin{figure}[t]
|
| 614 |
+
\centering
|
| 615 |
+
\begin{tikzpicture}
|
| 616 |
+
\begin{axis}[
|
| 617 |
+
width=0.92\textwidth,
|
| 618 |
+
height=7cm,
|
| 619 |
+
xlabel={Training tokens},
|
| 620 |
+
ylabel={HellaSwag (acc\_norm, \%)},
|
| 621 |
+
xmode=log,
|
| 622 |
+
xmin=2e10, xmax=5e11,
|
| 623 |
+
ymin=25, ymax=58,
|
| 624 |
+
grid=both,
|
| 625 |
+
grid style={gray!15},
|
| 626 |
+
legend style={at={(0.97,0.97)}, anchor=north east, font=\small},
|
| 627 |
+
xtick={5e10, 1e11, 3e11},
|
| 628 |
+
xticklabels={50B, 100B, 300B},
|
| 629 |
+
]
|
| 630 |
+
\addplot[only marks, mark=*, mark size=2.5pt, gray!60] coordinates {
|
| 631 |
+
(3e11, 29.2)
|
| 632 |
+
(1e11, 31.5)
|
| 633 |
+
(3e11, 32.0)
|
| 634 |
+
(3e11, 33.3)
|
| 635 |
+
(3e11, 37.6)
|
| 636 |
+
(3e11, 41.5)
|
| 637 |
+
(1e11, 50.9)
|
| 638 |
+
};
|
| 639 |
+
\addplot[only marks, mark=*, mark size=3.5pt, black, fill=black!70] coordinates {
|
| 640 |
+
(3.9e10, 53.5)
|
| 641 |
+
};
|
| 642 |
+
\node[font=\tiny, anchor=south west] at (axis cs:3.15e11, 29.2) {OPT-125M};
|
| 643 |
+
\node[font=\tiny, anchor=south east] at (axis cs:9.5e10, 31.5) {GPT-2 Small};
|
| 644 |
+
\node[font=\tiny, anchor=south west] at (axis cs:3.15e11, 32.0) {OPT-350M};
|
| 645 |
+
\node[font=\tiny, anchor=south west] at (axis cs:3.15e11, 33.3) {Pythia-410M};
|
| 646 |
+
\node[font=\tiny, anchor=south west] at (axis cs:3.15e11, 37.6) {Pythia-1B};
|
| 647 |
+
\node[font=\tiny, anchor=south west] at (axis cs:3.15e11, 41.5) {OPT-1.3B};
|
| 648 |
+
\node[font=\tiny, anchor=south east] at (axis cs:9.5e10, 50.9) {GPT-2 XL};
|
| 649 |
+
\node[font=\scriptsize, anchor=south west] at (axis cs:4.2e10, 53.5) {\textbf{Julian-600M}};
|
| 650 |
+
\legend{Other models, Julian (ours)}
|
| 651 |
+
\end{axis}
|
| 652 |
+
\end{tikzpicture}
|
| 653 |
+
\caption{Token efficiency: HellaSwag accuracy vs.\ training data volume. Julian-600M (bottom-left, 39B tokens) achieves the highest HellaSwag score with 7.7$\times$ less training data than OPT and Pythia models (300B tokens). The diamond marker highlights Julian's position in the high-accuracy, low-data region.}
|
| 654 |
+
\label{fig:token_efficiency}
|
| 655 |
+
\end{figure}
|
| 656 |
+
|
| 657 |
+
\subsection{The HellaSwag Anomaly}
|
| 658 |
+
|
| 659 |
+
The HellaSwag score of 53.5\% for Julian-600M is remarkably high---surpassing even GPT-2~XL (50.9\%) which has 2.5$\times$ more parameters. Several hypotheses merit investigation:
|
| 660 |
+
|
| 661 |
+
\begin{itemize}[leftmargin=*]
|
| 662 |
+
\item \textbf{Architectural hypothesis}: Modern components (RoPE, SwiGLU, RMSNorm) may be particularly advantageous for text completion tasks measured by HellaSwag. The length-normalized scoring (acc\_norm) could also favor our architecture.
|
| 663 |
+
\item \textbf{Data quality hypothesis}: FineWeb-Edu's educational content may provide particularly relevant training signal for the commonsense scenarios tested by HellaSwag.
|
| 664 |
+
\item \textbf{Contamination hypothesis}: While we applied rigorous deduplication \citep{lee2022deduplicating}, we cannot fully exclude partial contamination with benchmark-adjacent data, particularly through FineWeb-Edu.
|
| 665 |
+
\end{itemize}
|
| 666 |
+
|
| 667 |
+
% ============================================================================
|
| 668 |
+
% 11. Limitations
|
| 669 |
+
% ============================================================================
|
| 670 |
+
\section{Limitations}
|
| 671 |
+
|
| 672 |
+
\begin{itemize}[leftmargin=*]
|
| 673 |
+
\item \textbf{Model size}: At 600M parameters, Julian has limited reasoning capabilities and factual accuracy compared to larger models.
|
| 674 |
+
\item \textbf{Training data volume}: While efficient, 39B tokens is below the Chinchilla-optimal ratio for 600M parameters ($\sim$12B optimal model size for 39B tokens), suggesting the model could benefit from further training.
|
| 675 |
+
\item \textbf{English-centric evaluation}: All benchmarks are in English. We lack standardized French evaluation benchmarks for language models of this size.
|
| 676 |
+
\item \textbf{Hallucination}: Like all language models, Julian frequently generates incorrect or fabricated information, particularly for factual queries.
|
| 677 |
+
\item \textbf{Basic instruction following}: SFT without reinforcement learning from human feedback \citep{christiano2017deep} (RLHF) or direct preference optimization \citep{rafailov2023direct} (DPO) produces basic instruction-following capabilities that are significantly weaker than RLHF-trained models.
|
| 678 |
+
\item \textbf{LAMBADA underperformance}: The relatively low LAMBADA accuracy (37.3\% vs.\ 50.5\% for Pythia-410M) indicates that broader text prediction capabilities lag behind the strong commonsense reasoning performance.
|
| 679 |
+
\end{itemize}
|
| 680 |
+
|
| 681 |
+
% ============================================================================
|
| 682 |
+
% 12. Conclusion
|
| 683 |
+
% ============================================================================
|
| 684 |
+
\section{Conclusion}
|
| 685 |
+
|
| 686 |
+
We have presented Julian, a family of bilingual language models trained from scratch on TPU infrastructure using JAX/Flax. Our flagship Julian-600M model achieves remarkable efficiency on HellaSwag (53.5\%), outperforming models with 2$\times$ more parameters trained on 8$\times$ more data. We have documented the complete training pipeline, from data collection and tokenizer training to pre-training, supervised fine-tuning, and evaluation.
|
| 687 |
+
|
| 688 |
+
\paragraph{Future Work.} We plan to: (1) scale Julian to 2B parameters using larger TPU configurations (v6e-64); (2) implement DPO \citep{rafailov2023direct} for improved instruction following; (3) develop French-language evaluation benchmarks; and (4) explore continued pre-training on larger datasets to improve LAMBADA and general text prediction performance.
|
| 689 |
+
|
| 690 |
+
\paragraph{Open Release.} All model weights are available at \url{https://huggingface.co/JulianKrgd} under the Apache 2.0 license.
|
| 691 |
+
|
| 692 |
+
% ============================================================================
|
| 693 |
+
% Acknowledgments
|
| 694 |
+
% ============================================================================
|
| 695 |
+
\section*{Acknowledgments}
|
| 696 |
+
|
| 697 |
+
This work was supported by the Google TPU Research Cloud (TRC) program, which provided access to Cloud TPU v4-32 pods. We thank the TRC team for their support and the allocation of compute resources that made this research possible.
|
| 698 |
+
|
| 699 |
+
% ============================================================================
|
| 700 |
+
% References
|
| 701 |
+
% ============================================================================
|
| 702 |
+
\bibliographystyle{plainnat}
|
| 703 |
+
|
| 704 |
+
\begin{thebibliography}{36}
|
| 705 |
+
|
| 706 |
+
\bibitem[Biderman et~al.(2023)]{biderman2023pythia}
|
| 707 |
+
Stella Biderman, Hailey Schoelkopf, Quentin Anthony, Herbie Bradley, Kyle O'Brien, Eric Hallahan, Mohammad Aflah Khan, Shivanshu Purohit, USVSN Sai Prashanth, Edward Raff, Aviya Skowron, Lintang Sutawika, and Oskar van~der Wal.
|
| 708 |
+
\newblock Pythia: A suite for analyzing large language models across training and scaling.
|
| 709 |
+
\newblock In \emph{ICML}, 2023.
|
| 710 |
+
\newblock \url{https://arxiv.org/abs/2304.01373}
|
| 711 |
+
|
| 712 |
+
\bibitem[Christiano et~al.(2017)]{christiano2017deep}
|
| 713 |
+
Paul~F Christiano, Jan Leike, Tom Brown, Miljan Martic, Shane Legg, and Dario Amodei.
|
| 714 |
+
\newblock Deep reinforcement learning from human preferences.
|
| 715 |
+
\newblock In \emph{NeurIPS}, 2017.
|
| 716 |
+
\newblock \url{https://arxiv.org/abs/1706.03741}
|
| 717 |
+
|
| 718 |
+
\bibitem[Bradbury et~al.(2018)]{bradbury2018jax}
|
| 719 |
+
James Bradbury, Roy Frostig, Peter Hawkins, Matthew~James Johnson, Chris Leary, Dougal Maclaurin, George Necula, Adam Paszke, Jake Vander{P}las, Skye Wanderman-{M}ilne, and Qiao Zhang.
|
| 720 |
+
\newblock {JAX}: Composable transformations of {Python}+{NumPy} programs.
|
| 721 |
+
\newblock 2018.
|
| 722 |
+
\newblock \url{https://github.com/jax-ml/jax}
|
| 723 |
+
|
| 724 |
+
\bibitem[Bisk et~al.(2020)]{bisk2020piqa}
|
| 725 |
+
Yonatan Bisk, Rowan Zellers, Ronan Le~Bras, Jianfeng Gao, and Yejin Choi.
|
| 726 |
+
\newblock {PIQA}: Reasoning about physical intuition in natural language.
|
| 727 |
+
\newblock In \emph{AAAI}, 2020.
|
| 728 |
+
\newblock \url{https://arxiv.org/abs/1911.11641}
|
| 729 |
+
|
| 730 |
+
\bibitem[Brown et~al.(2020)]{brown2020language}
|
| 731 |
+
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared~D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et~al.
|
| 732 |
+
\newblock Language models are few-shot learners.
|
| 733 |
+
\newblock In \emph{NeurIPS}, 2020.
|
| 734 |
+
\newblock \url{https://arxiv.org/abs/2005.14165}
|
| 735 |
+
|
| 736 |
+
\bibitem[Chowdhery et~al.(2023)]{chowdhery2023palm}
|
| 737 |
+
Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, Paul Barham, Hyung~Won Chung, Charles Sutton, Sebastian Gehrmann, et~al.
|
| 738 |
+
\newblock {PaLM}: Scaling language modeling with {P}athways.
|
| 739 |
+
\newblock \emph{JMLR}, 2023.
|
| 740 |
+
\newblock \url{https://arxiv.org/abs/2204.02311}
|
| 741 |
+
|
| 742 |
+
\bibitem[Clark et~al.(2018)]{clark2018think}
|
| 743 |
+
Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord.
|
| 744 |
+
\newblock Think you have solved question answering? {T}ry {ARC}, the {AI2} reasoning challenge.
|
| 745 |
+
\newblock \emph{arXiv preprint arXiv:1803.05457}, 2018.
|
| 746 |
+
\newblock \url{https://arxiv.org/abs/1803.05457}
|
| 747 |
+
|
| 748 |
+
\bibitem[Clark et~al.(2019)]{clark2019boolq}
|
| 749 |
+
Christopher Clark, Kenton Lee, Ming-Wei Chang, Tom Kwiatkowski, Michael Collins, and Kristina Toutanova.
|
| 750 |
+
\newblock {BoolQ}: Exploring the surprising difficulty of natural yes/no questions.
|
| 751 |
+
\newblock In \emph{NAACL}, 2019.
|
| 752 |
+
\newblock \url{https://arxiv.org/abs/1905.10044}
|
| 753 |
+
|
| 754 |
+
\bibitem[Conneau et~al.(2020)]{conneau2020xlmr}
|
| 755 |
+
Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzm{\'a}n, Edouard Grave, Myle Ott, Luke Zettlemoyer, and Veselin Stoyanov.
|
| 756 |
+
\newblock Unsupervised cross-lingual representation learning at scale.
|
| 757 |
+
\newblock In \emph{ACL}, 2020.
|
| 758 |
+
\newblock \url{https://arxiv.org/abs/1911.02116}
|
| 759 |
+
|
| 760 |
+
\bibitem[Devlin et~al.(2019)]{devlin2019bert}
|
| 761 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova.
|
| 762 |
+
\newblock {BERT}: Pre-training of deep bidirectional transformers for language understanding.
|
| 763 |
+
\newblock In \emph{NAACL}, 2019.
|
| 764 |
+
\newblock \url{https://arxiv.org/abs/1810.04805}
|
| 765 |
+
|
| 766 |
+
\bibitem[Gao et~al.(2023)]{gao2023framework}
|
| 767 |
+
Leo Gao, Jonathan Tow, Baber Abbasi, Stella Biderman, Sid Black, Anthony DiPofi, Charles Foster, Laurence Golding, Jeffrey Hsu, Alain Le~Noac'h, Haonan Li, Kyle McDonell, Niklas Muennighoff, Chris Ociepa, Jason Phang, Laria Reynolds, Hailey Schoelkopf, Aviya Skowron, Lintang Sutawika, Eric Tang, Anish Thite, Ben Wang, Kevin Wang, and Andy Zou.
|
| 768 |
+
\newblock A framework for few-shot language model evaluation.
|
| 769 |
+
\newblock \emph{Zenodo}, 2023.
|
| 770 |
+
\newblock \url{https://zenodo.org/records/10256836}
|
| 771 |
+
|
| 772 |
+
\bibitem[Hoffmann et~al.(2022)]{hoffmann2022training}
|
| 773 |
+
Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya, Trevor Cai, Eliza Rutherford, Diego de~Las~Casas, Lisa~Anne Hendricks, Johannes Welbl, Aidan Clark, Tom Hennigan, Eric Noland, Katie Millican, George van~den Driessche, Bogdan Damoc, Aurelia Guy, Simon Osindero, Karen Simonyan, Erich Elsen, Jack~W. Rae, Oriol Vinyals, and Laurent Sifre.
|
| 774 |
+
\newblock Training compute-optimal large language models.
|
| 775 |
+
\newblock In \emph{NeurIPS}, 2022.
|
| 776 |
+
\newblock \url{https://arxiv.org/abs/2203.15556}
|
| 777 |
+
|
| 778 |
+
\bibitem[Kaplan et~al.(2020)]{kaplan2020scaling}
|
| 779 |
+
Jared Kaplan, Sam McCandlish, Tom Henighan, Tom~B Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever.
|
| 780 |
+
\newblock Scaling laws for neural language models.
|
| 781 |
+
\newblock \emph{arXiv preprint arXiv:2001.08361}, 2020.
|
| 782 |
+
\newblock \url{https://arxiv.org/abs/2001.08361}
|
| 783 |
+
|
| 784 |
+
\bibitem[Lee et~al.(2022)]{lee2022deduplicating}
|
| 785 |
+
Katherine Lee, Daphne Ippolito, Andrew Nystrom, Chiyuan Zhang, Douglas Eck, Chris Callison-Burch, and Nicholas Carlini.
|
| 786 |
+
\newblock Deduplicating training data makes language models better.
|
| 787 |
+
\newblock In \emph{ACL}, 2022.
|
| 788 |
+
\newblock \url{https://arxiv.org/abs/2107.06499}
|
| 789 |
+
|
| 790 |
+
\bibitem[Kudo and Richardson(2018)]{kudo2018sentencepiece}
|
| 791 |
+
Taku Kudo and John Richardson.
|
| 792 |
+
\newblock {SentencePiece}: A simple and language independent subword tokenizer and detokenizer for neural text processing.
|
| 793 |
+
\newblock In \emph{EMNLP (demo)}, 2018.
|
| 794 |
+
\newblock \url{https://arxiv.org/abs/1808.06226}
|
| 795 |
+
|
| 796 |
+
\bibitem[Liu et~al.(2024)]{liu2024mobilellm}
|
| 797 |
+
Zechun Liu, Changlin Li, Barlas O\u{g}uz, et~al.
|
| 798 |
+
\newblock {MobileLLM}: Optimizing sub-billion parameter language models for on-device use cases.
|
| 799 |
+
\newblock In \emph{ICML}, 2024.
|
| 800 |
+
\newblock \url{https://arxiv.org/abs/2402.14905}
|
| 801 |
+
|
| 802 |
+
\bibitem[Micikevicius et~al.(2018)]{micikevicius2018mixed}
|
| 803 |
+
Paulius Micikevicius, Sharan Narang, Jonah Alben, Gregory Diamos, Erich Elsen, David Garcia, Boris Ginsburg, Michael Houston, Oleksii Kuchaiev, Ganesh Venkatesh, and Hao Wu.
|
| 804 |
+
\newblock Mixed precision training.
|
| 805 |
+
\newblock In \emph{ICLR}, 2018.
|
| 806 |
+
\newblock \url{https://arxiv.org/abs/1710.03740}
|
| 807 |
+
|
| 808 |
+
\bibitem[Loshchilov and Hutter(2019)]{loshchilov2019decoupled}
|
| 809 |
+
Ilya Loshchilov and Frank Hutter.
|
| 810 |
+
\newblock Decoupled weight decay regularization.
|
| 811 |
+
\newblock In \emph{ICLR}, 2019.
|
| 812 |
+
\newblock \url{https://arxiv.org/abs/1711.05101}
|
| 813 |
+
|
| 814 |
+
\bibitem[OpenAI(2023)]{openai2023chatml}
|
| 815 |
+
OpenAI.
|
| 816 |
+
\newblock {ChatML}: Chat markup language.
|
| 817 |
+
\newblock Technical documentation, 2023.
|
| 818 |
+
\newblock \url{https://github.com/openai/openai-python/blob/v0.28.1/chatml.md}
|
| 819 |
+
|
| 820 |
+
\bibitem[Ouyang et~al.(2022)]{ouyang2022training}
|
| 821 |
+
Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et~al.
|
| 822 |
+
\newblock Training language models to follow instructions with human feedback.
|
| 823 |
+
\newblock In \emph{NeurIPS}, 2022.
|
| 824 |
+
\newblock \url{https://arxiv.org/abs/2203.02155}
|
| 825 |
+
|
| 826 |
+
\bibitem[Paperno et~al.(2016)]{paperno2016lambada}
|
| 827 |
+
Denis Paperno, Germ{\'a}n Kruszewski, Angeliki Lazaridou, Quan~Ngoc Pham, Raffaella Bernardi, Sandro Pezzelle, Marco Baroni, Gemma Boleda, and Raquel Fern{\'a}ndez.
|
| 828 |
+
\newblock The {LAMBADA} dataset: Word prediction requiring a broad discourse context.
|
| 829 |
+
\newblock In \emph{ACL}, 2016.
|
| 830 |
+
\newblock \url{https://arxiv.org/abs/1606.06031}
|
| 831 |
+
|
| 832 |
+
\bibitem[Rafailov et~al.(2023)]{rafailov2023direct}
|
| 833 |
+
Rafael Rafailov, Archit Sharma, Eric Mitchell, Stefano Ermon, Christopher~D Manning, and Chelsea Finn.
|
| 834 |
+
\newblock Direct preference optimization: Your language model is secretly a reward model.
|
| 835 |
+
\newblock In \emph{NeurIPS}, 2023.
|
| 836 |
+
\newblock \url{https://arxiv.org/abs/2305.18290}
|
| 837 |
+
|
| 838 |
+
\bibitem[Radford et~al.(2019)]{radford2019language}
|
| 839 |
+
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever.
|
| 840 |
+
\newblock Language models are unsupervised multitask learners.
|
| 841 |
+
\newblock \emph{OpenAI blog}, 2019.
|
| 842 |
+
\newblock \url{https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf}
|
| 843 |
+
|
| 844 |
+
\bibitem[Sakaguchi et~al.(2020)]{sakaguchi2020winogrande}
|
| 845 |
+
Keisuke Sakaguchi, Ronan Le~Bras, Chandra Bhagavatula, and Yejin Choi.
|
| 846 |
+
\newblock {WinoGrande}: An adversarial winograd schema challenge at scale.
|
| 847 |
+
\newblock In \emph{AAAI}, 2020.
|
| 848 |
+
\newblock \url{https://arxiv.org/abs/1907.10641}
|
| 849 |
+
|
| 850 |
+
\bibitem[Shazeer(2020)]{shazeer2020glu}
|
| 851 |
+
Noam Shazeer.
|
| 852 |
+
\newblock {GLU} variants improve transformer.
|
| 853 |
+
\newblock \emph{arXiv preprint arXiv:2002.05202}, 2020.
|
| 854 |
+
\newblock \url{https://arxiv.org/abs/2002.05202}
|
| 855 |
+
|
| 856 |
+
\bibitem[Su et~al.(2021)]{su2021roformer}
|
| 857 |
+
Jianlin Su, Yu Lu, Shengfeng Pan, Ahmed Murtadha, Bo Wen, and Yunfeng Liu.
|
| 858 |
+
\newblock {RoFormer}: Enhanced transformer with rotary position embedding.
|
| 859 |
+
\newblock \emph{arXiv preprint arXiv:2104.09864}, 2021.
|
| 860 |
+
\newblock \url{https://arxiv.org/abs/2104.09864}
|
| 861 |
+
|
| 862 |
+
\bibitem[Touvron et~al.(2023)]{touvron2023llama}
|
| 863 |
+
Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timoth{\'e}e Lacroix, Baptiste Rozi{\`e}re, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample.
|
| 864 |
+
\newblock {LLaMA}: Open and efficient foundation language models.
|
| 865 |
+
\newblock \emph{arXiv preprint arXiv:2302.13971}, 2023.
|
| 866 |
+
\newblock \url{https://arxiv.org/abs/2302.13971}
|
| 867 |
+
|
| 868 |
+
\bibitem[Xu et~al.(2021)]{xu2021gspmd}
|
| 869 |
+
Yuanzhong Xu, HyoukJoong Lee, Dehao Chen, Blake Hechtman, Yanping Huang, Rahul Joshi, Maxim Krikun, Dmitry Lepikhin, Andy Ly, Marcello Maggioni, Ruoming Pang, Noam Shazeer, Shibo Wang, Tao Wang, Yonghui Wu, and Zhifeng Chen.
|
| 870 |
+
\newblock {GSPMD}: General and scalable parallelization for {ML} computation graphs.
|
| 871 |
+
\newblock \emph{arXiv preprint arXiv:2105.04663}, 2021.
|
| 872 |
+
\newblock \url{https://arxiv.org/abs/2105.04663}
|
| 873 |
+
|
| 874 |
+
\bibitem[Vaswani et~al.(2017)]{vaswani2017attention}
|
| 875 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan~N Gomez, {\L}ukasz Kaiser, and Illia Polosukhin.
|
| 876 |
+
\newblock Attention is all you need.
|
| 877 |
+
\newblock In \emph{NeurIPS}, 2017.
|
| 878 |
+
\newblock \url{https://arxiv.org/abs/1706.03762}
|
| 879 |
+
|
| 880 |
+
\bibitem[Workshop et~al.(2023)]{workshop2023bloom}
|
| 881 |
+
BigScience Workshop, Teven Le~Scao, Angela Fan, et~al.
|
| 882 |
+
\newblock {BLOOM}: A 176B-parameter open-access multilingual language model.
|
| 883 |
+
\newblock \emph{arXiv preprint arXiv:2211.05100}, 2023.
|
| 884 |
+
\newblock \url{https://arxiv.org/abs/2211.05100}
|
| 885 |
+
|
| 886 |
+
\bibitem[Zellers et~al.(2019)]{zellers2019hellaswag}
|
| 887 |
+
Rowan Zellers, Ari Holtzman, Yonatan Bisk, Ali Farhadi, and Yejin Choi.
|
| 888 |
+
\newblock {HellaSwag}: Can a machine really finish your sentence?
|
| 889 |
+
\newblock In \emph{ACL}, 2019.
|
| 890 |
+
\newblock \url{https://arxiv.org/abs/1905.07830}
|
| 891 |
+
|
| 892 |
+
\bibitem[Zhang et~al.(2022)]{zhang2022opt}
|
| 893 |
+
Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen, Christopher Dewan, Mona Diab, Xian Li, Xi~Victoria Lin, Todor Mihaylov, Myle Ott, Sam Shleifer, Kurt Shuster, Daniel Simig, Punit~Singh Koura, Anjali Sridhar, Tianlu Wang, and Luke Zettlemoyer.
|
| 894 |
+
\newblock {OPT}: Open pre-trained transformer language models.
|
| 895 |
+
\newblock \emph{arXiv preprint arXiv:2205.01068}, 2022.
|
| 896 |
+
\newblock \url{https://arxiv.org/abs/2205.01068}
|
| 897 |
+
|
| 898 |
+
\bibitem[Zhang and Sennrich(2019)]{zhang2019root}
|
| 899 |
+
Biao Zhang and Rico Sennrich.
|
| 900 |
+
\newblock Root mean square layer normalization.
|
| 901 |
+
\newblock In \emph{NeurIPS}, 2019.
|
| 902 |
+
\newblock \url{https://arxiv.org/abs/1910.07467}
|
| 903 |
+
|
| 904 |
+
\bibitem[Zhang et~al.(2024)]{zhang2024tinyllama}
|
| 905 |
+
Peiyuan Zhang, Guangtao Zeng, Tianduo Wang, and Wei Lu.
|
| 906 |
+
\newblock {TinyLlama}: An open-source small language model.
|
| 907 |
+
\newblock \emph{arXiv preprint arXiv:2401.02385}, 2024.
|
| 908 |
+
\newblock \url{https://arxiv.org/abs/2401.02385}
|
| 909 |
+
|
| 910 |
+
\end{thebibliography}
|
| 911 |
+
|
| 912 |
+
% ============================================================================
|
| 913 |
+
% Appendix
|
| 914 |
+
% ============================================================================
|
| 915 |
+
\appendix
|
| 916 |
+
\section{Full Hyperparameter Tables}
|
| 917 |
+
\label{app:hyperparams}
|
| 918 |
+
|
| 919 |
+
\begin{table}[h]
|
| 920 |
+
\centering
|
| 921 |
+
\caption{Complete pre-training configuration for Julian-600M.}
|
| 922 |
+
\begin{tabular}{lc}
|
| 923 |
+
\toprule
|
| 924 |
+
\textbf{Category} & \textbf{Value} \\
|
| 925 |
+
\midrule
|
| 926 |
+
\multicolumn{2}{l}{\textit{Model}} \\
|
| 927 |
+
Parameters & $\sim$600M \\
|
| 928 |
+
Hidden dimension & 1280 \\
|
| 929 |
+
Layers & 18 \\
|
| 930 |
+
Attention heads & 20 \\
|
| 931 |
+
Head dimension & 64 \\
|
| 932 |
+
FFN dimension & 5120 \\
|
| 933 |
+
Activation & SwiGLU (SiLU gate) \\
|
| 934 |
+
Normalization & RMSNorm ($\epsilon = 10^{-6}$) \\
|
| 935 |
+
Position encoding & RoPE ($\theta = 10{,}000$) \\
|
| 936 |
+
Vocabulary & 50{,}000 (SentencePiece BPE) \\
|
| 937 |
+
Context length & 2{,}048 \\
|
| 938 |
+
Dropout & 0.1 \\
|
| 939 |
+
\midrule
|
| 940 |
+
\multicolumn{2}{l}{\textit{Optimization}} \\
|
| 941 |
+
Optimizer & AdamW \\
|
| 942 |
+
$\beta_1, \beta_2$ & 0.9, 0.95 \\
|
| 943 |
+
$\epsilon$ & $10^{-8}$ \\
|
| 944 |
+
Weight decay & 0.1 \\
|
| 945 |
+
Peak LR & $1.2 \times 10^{-3}$ \\
|
| 946 |
+
Min LR & $1.2 \times 10^{-4}$ \\
|
| 947 |
+
LR schedule & Cosine with linear warmup \\
|
| 948 |
+
Warmup steps & 3{,}000 \\
|
| 949 |
+
Total steps & 300{,}000 \\
|
| 950 |
+
Gradient clipping & 1.0 (global norm) \\
|
| 951 |
+
Optimizer state precision & bfloat16 \\
|
| 952 |
+
\midrule
|
| 953 |
+
\multicolumn{2}{l}{\textit{Compute}} \\
|
| 954 |
+
Hardware & TPU v4-32 (32 chips, 4 hosts) \\
|
| 955 |
+
Batch per device & 4 \\
|
| 956 |
+
Gradient accumulation & 8 \\
|
| 957 |
+
Effective batch size & 1{,}024 \\
|
| 958 |
+
Precision & bfloat16 mixed \\
|
| 959 |
+
Tokens per step & $\sim$2.1M \\
|
| 960 |
+
Total tokens & $\sim$39B \\
|
| 961 |
+
Checkpointing & Orbax async, every 10K steps \\
|
| 962 |
+
\bottomrule
|
| 963 |
+
\end{tabular}
|
| 964 |
+
\end{table}
|
| 965 |
+
|
| 966 |
+
\section{Model Availability}
|
| 967 |
+
|
| 968 |
+
All Julian models are available on the HuggingFace Hub:
|
| 969 |
+
|
| 970 |
+
\begin{table}[h]
|
| 971 |
+
\centering
|
| 972 |
+
\begin{tabular}{ll}
|
| 973 |
+
\toprule
|
| 974 |
+
\textbf{Model} & \textbf{HuggingFace Repository} \\
|
| 975 |
+
\midrule
|
| 976 |
+
Julian-600M Base & \texttt{JulianKrgd/julian-600m-40b} \\
|
| 977 |
+
Julian-600M-10B-Instruct-v0.1 & \texttt{JulianKrgd/julian-600m-10b-instruct-v0.1} \\
|
| 978 |
+
Julian-600M SFT-30K & \texttt{JulianKrgd/julian-600m-40b-instruct-sft30k} \\
|
| 979 |
+
Julian-600M SFT-100K & \texttt{JulianKrgd/julian-600m-40b-instruct-sft100k} \\
|
| 980 |
+
\bottomrule
|
| 981 |
+
\end{tabular}
|
| 982 |
+
\end{table}
|
| 983 |
+
|
| 984 |
+
\end{document}
|
julian_paper_fr.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0ec43641f185a3dac51a4d4691cf913b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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
\documentclass[11pt,a4paper]{article}
|
| 2 |
+
|
| 3 |
+
% ============================================================================
|
| 4 |
+
% Packages
|
| 5 |
+
% ============================================================================
|
| 6 |
+
\usepackage[utf8]{inputenc}
|
| 7 |
+
\usepackage[T1]{fontenc}
|
| 8 |
+
\usepackage[french]{babel}
|
| 9 |
+
\usepackage{times}
|
| 10 |
+
\usepackage{geometry}
|
| 11 |
+
\geometry{margin=1in}
|
| 12 |
+
\usepackage{amsmath,amssymb}
|
| 13 |
+
\usepackage{graphicx}
|
| 14 |
+
\usepackage{booktabs}
|
| 15 |
+
\usepackage{hyperref}
|
| 16 |
+
\usepackage{url}
|
| 17 |
+
\urlstyle{same}
|
| 18 |
+
\usepackage{natbib}
|
| 19 |
+
\usepackage{xcolor}
|
| 20 |
+
\usepackage{array}
|
| 21 |
+
\usepackage{float}
|
| 22 |
+
\usepackage{enumitem}
|
| 23 |
+
\usepackage{fancyvrb}
|
| 24 |
+
\usepackage{pgfplots}
|
| 25 |
+
\pgfplotsset{compat=1.18}
|
| 26 |
+
|
| 27 |
+
\hypersetup{
|
| 28 |
+
colorlinks=true,
|
| 29 |
+
linkcolor=blue!60!black,
|
| 30 |
+
citecolor=blue!60!black,
|
| 31 |
+
urlcolor=blue!60!black
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
% ============================================================================
|
| 35 |
+
% Titre
|
| 36 |
+
% ============================================================================
|
| 37 |
+
\title{
|
| 38 |
+
\textbf{Julian : Entra\^inement Efficace d'un Mod\`ele de Langage \\
|
| 39 |
+
Bilingue de 600M de Param\`etres sur TPU avec JAX}
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
\author{
|
| 43 |
+
Julian Kerignard \\
|
| 44 |
+
Recherche Ind\'ependante \\
|
| 45 |
+
\texttt{github.com/JulianKrgd} \\
|
| 46 |
+
\texttt{huggingface.co/JulianKrgd}
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
\date{F\'evrier 2026}
|
| 50 |
+
|
| 51 |
+
\begin{document}
|
| 52 |
+
\maketitle
|
| 53 |
+
|
| 54 |
+
% ============================================================================
|
| 55 |
+
% R\'esum\'e
|
| 56 |
+
% ============================================================================
|
| 57 |
+
\begin{abstract}
|
| 58 |
+
Nous pr\'esentons \textbf{Julian}\footnote{Mod\`eles disponibles sur HuggingFace : \url{https://huggingface.co/JulianKrgd}}, une famille de mod\`eles de langage \`a d\'ecodeur seul (\emph{decoder-only}) allant de 100M \`a 600M de param\`etres, entra\^in\'es enti\`erement \`a partir de z\'ero sur jusqu'\`a 39 milliards de tokens de donn\'ees bilingues anglais-fran\c{c}ais, en utilisant JAX/Flax sur les TPU de Google Cloud. Notre mod\`ele principal, Julian-600M, emploie une architecture Transformer moderne avec des Rotary Position Embeddings (RoPE), des activations SwiGLU et une normalisation RMSNorm, suivant les principes de conception de LLaMA. Malgr\'e un entra\^inement sur significativement moins de tokens que les mod\`eles comparables, Julian-600M atteint 53,5\,\% de pr\'ecision normalis\'ee sur HellaSwag, surpassant OPT-1.3B (41,5\,\%) qui poss\`ede plus du double de param\`etres et a \'et\'e entra\^in\'e sur 8$\times$ plus de donn\'ees. Nous effectuons ensuite un \emph{Supervised Fine-Tuning} (SFT) de Julian-600M sur 2,47 millions de paires instruction-r\'eponse format\'ees avec le template ChatML, produisant des variantes capables de suivre des instructions \`a 30K et 100K pas d'entra\^inement. Nous fournissons un compte-rendu d\'etaill\'e de notre infrastructure d'entra\^inement, de notre pipeline de donn\'ees et des d\'efis de l'entra\^inement multi-h\^ote sur TPU avec JAX. Tous les poids des mod\`eles sont publi\'es ouvertement sous licence Apache 2.0 sur HuggingFace.
|
| 59 |
+
\end{abstract}
|
| 60 |
+
|
| 61 |
+
% ============================================================================
|
| 62 |
+
% 1. Introduction
|
| 63 |
+
% ============================================================================
|
| 64 |
+
\section{Introduction}
|
| 65 |
+
|
| 66 |
+
L'avanc\'ee rapide des grands mod\`eles de langage (\emph{Large Language Models}, LLM) a d\'emontr\'e des capacit\'es remarquables en compr\'ehension et g\'en\'eration de langage naturel \citep{brown2020language, chowdhery2023palm, touvron2023llama}. Cependant, l'entra\^inement de tels mod\`eles n\'ecessite g\'en\'eralement d'\'enormes ressources computationnelles, souvent inaccessibles aux chercheurs ind\'ependants et aux petites organisations.
|
| 67 |
+
|
| 68 |
+
Les travaux r\'ecents ont montr\'e que des mod\`eles de langage plus petits, lorsqu'ils sont entra\^in\'es avec des donn\'ees et des techniques appropri\'ees, peuvent atteindre des performances comp\'etitives sur de nombreux benchmarks \citep{biderman2023pythia, zhang2022opt}. Les lois d'\'echelle de Chinchilla \citep{hoffmann2022training} sugg\`erent de plus que de nombreux mod\`eles sont sous-entra\^in\'es par rapport \`a leur taille, et que la performance optimale n\'ecessite un \'equilibre soigneux entre la taille du mod\`ele et le volume de donn\'ees d'entra\^inement.
|
| 69 |
+
|
| 70 |
+
Un LLM fonctionne de mani\`ere fondamentalement simple : il pr\'edit le token suivant dans une s\'equence de texte. \`A partir d'un contexte donn\'e (par exemple, \og La capitale de la France est\fg), le mod\`ele calcule une distribution de probabilit\'e sur l'ensemble de son vocabulaire (50\,000 tokens dans notre cas) et s\'electionne le token le plus probable. C'est en empilant ces pr\'edictions que le mod\`ele g\'en\`ere du texte coh\'erent. La qualit\'e de ces pr\'edictions d\'epend directement de deux facteurs : l'architecture du mod\`ele (comment il traite l'information) et les donn\'ees d'entra\^inement (ce qu'il a appris \`a pr\'edire).
|
| 71 |
+
|
| 72 |
+
Dans ce travail, nous pr\'esentons \textbf{Julian}, une famille de mod\`eles de langage bilingues (anglais-fran\c{c}ais) entra\^in\'es \`a partir de z\'ero en utilisant JAX/Flax sur des pods TPU v4-32 de Google Cloud. Nos contributions sont les suivantes :
|
| 73 |
+
|
| 74 |
+
\begin{enumerate}[leftmargin=*]
|
| 75 |
+
\item \textbf{Entra\^inement efficace} : Nous entra\^inons un mod\`ele de 600M de param\`etres sur 39B tokens qui surpasse OPT-1.3B sur HellaSwag malgr\'e 2$\times$ moins de param\`etres et 8$\times$ moins de tokens d'entra\^inement.
|
| 76 |
+
\item \textbf{Capacit\'e bilingue} : \`A notre connaissance, Julian est parmi les rares petits mod\`eles de langage ouvertement publi\'es, entra\^in\'es \`a partir de z\'ero sur un m\'elange de donn\'ees anglaises et fran\c{c}aises (ratio 70\,\%/30\,\%).
|
| 77 |
+
\item \textbf{Pipeline complet} : Nous d\'ecrivons l'int\'egralit\'e du pipeline d'entra\^inement, incluant la collecte de donn\'ees, l'entra\^inement du tokenizer, le pr\'e-entra\^inement, le fine-tuning supervis\'e et l'\'evaluation, fournissant un guide pratique pour entra\^iner des LLM sur infrastructure TPU.
|
| 78 |
+
\item \textbf{Publication ouverte} : Tous les poids des mod\`eles, le tokenizer et le code d'entra\^inement sont publi\'es sous licence Apache 2.0.
|
| 79 |
+
\end{enumerate}
|
| 80 |
+
|
| 81 |
+
% ============================================================================
|
| 82 |
+
% 2. Travaux Connexes
|
| 83 |
+
% ============================================================================
|
| 84 |
+
\section{Travaux Connexes}
|
| 85 |
+
|
| 86 |
+
\paragraph{Lois d'\'echelle.}
|
| 87 |
+
\citet{kaplan2020scaling} ont \'etabli les lois d'\'echelle neuronales montrant des relations en loi de puissance entre la taille du mod\`ele, la taille du dataset, le budget de calcul et la loss. Intuitivement, ces lois indiquent qu'augmenter la taille d'un mod\`ele ou la quantit\'e de donn\'ees am\'eliore la performance de mani\`ere pr\'edictible, mais avec des rendements d\'ecroissants. \citet{hoffmann2022training} ont affin\'e ces r\'esultats avec les lois d'\'echelle de Chinchilla, d\'emontrant que de nombreux grands mod\`eles sont significativement sous-entra\^in\'es et que le ratio optimal tokens/param\`etres est d'environ 20:1. Concr\`etement, un mod\`ele de 600M de param\`etres devrait id\'ealement \^etre entra\^in\'e sur environ 12 milliards de tokens pour atteindre son optimum. Notre mod\`ele Julian-600M est entra\^in\'e sur 39B tokens (ratio 65:1), d\'epassant largement le budget optimal de Chinchilla, ce qui signifie que nous investissons davantage de calcul dans l'entra\^inement que ce que la th\'eorie sugg\`ere comme minimum.
|
| 88 |
+
|
| 89 |
+
\paragraph{Mod\`eles de langage ouverts.}
|
| 90 |
+
GPT-2 \citep{radford2019language} a \'et\'e pionnier dans la publication de mod\`eles de langage pr\'e-entra\^in\'es, avec des tailles allant de 124M \`a 1,5B de param\`etres. OPT \citep{zhang2022opt} a fourni des mod\`eles de 125M \`a 175B de param\`etres entra\^in\'es sur 300B tokens avec des journaux d'entra\^inement d\'etaill\'es. Pythia \citep{biderman2023pythia} a offert une suite de mod\`eles de 70M \`a 12B de param\`etres entra\^in\'es sur 300B tokens issus de The Pile, sp\'ecifiquement con\c{c}us pour \'etudier le comportement des mod\`eles pendant l'entra\^inement. LLaMA \citep{touvron2023llama} a introduit des am\'eliorations architecturales (RoPE, SwiGLU, RMSNorm) devenues standard dans les mod\`eles de langage modernes.
|
| 91 |
+
|
| 92 |
+
\paragraph{Petits mod\`eles de langage.}
|
| 93 |
+
TinyLlama \citep{zhang2024tinyllama} a d\'emontr\'e qu'un mod\`ele de 1,1B entra\^in\'e sur 3T tokens peut atteindre de bonnes performances. MobileLLM \citep{liu2024mobilellm} a explor\'e la conception d'architectures pour des mod\`eles \`a moins d'un milliard de param\`etres, destin\'es \`a fonctionner sur des appareils mobiles. Ces travaux soulignent la viabilit\'e et l'int\'er\^et croissant pour des mod\`eles plus petits et plus efficaces, capables de fonctionner sans infrastructure cloud co\^uteuse.
|
| 94 |
+
|
| 95 |
+
\paragraph{Mod\`eles multilingues.}
|
| 96 |
+
Alors que de grands mod\`eles multilingues comme mBERT \citep{devlin2019bert}, XLM-R \citep{conneau2020xlmr} et BLOOM \citep{workshop2023bloom} couvrent de nombreuses langues, peu de petits mod\`eles sont sp\'ecifiquement con\c{c}us pour la g\'en\'eration de texte bilingue anglais-fran\c{c}ais \`a partir de z\'ero. BLOOM (176B param\`etres) est notable pour son inclusion explicite du fran\c{c}ais, mais sa taille le rend inaccessible pour la plupart des cas d'usage en inf\'erence locale.
|
| 97 |
+
|
| 98 |
+
% ============================================================================
|
| 99 |
+
% 3. Architecture du Mod\`ele
|
| 100 |
+
% ============================================================================
|
| 101 |
+
\section{Architecture du Mod\`ele}
|
| 102 |
+
|
| 103 |
+
Julian suit l'architecture LLaMA \citep{touvron2023llama} : un Transformer \`a d\'ecodeur seul avec pr\'e-normalisation par RMSNorm \citep{zhang2019root}, des r\'eseaux feed-forward SwiGLU \citep{shazeer2020glu}, et des Rotary Position Embeddings (RoPE) \citep{su2021roformer}. Aucun terme de biais n'est utilis\'e dans les projections lin\'eaires.
|
| 104 |
+
|
| 105 |
+
Un Transformer \`a d\'ecodeur seul est une architecture de r\'eseau de neurones qui traite le texte s\'equentiellement, de gauche \`a droite. Chaque \og couche \fg{} du mod\`ele effectue deux op\'erations principales : (1) un m\'ecanisme d'\emph{attention} qui permet \`a chaque token de \og regarder \fg{} les tokens pr\'ec\'edents pour comprendre le contexte, et (2) un r\'eseau feed-forward qui transforme cette information. Ces deux op\'erations sont r\'ep\'et\'ees 18 fois dans Julian-600M, permettant au mod\`ele de construire des repr\'esentations de plus en plus abstraites du texte.
|
| 106 |
+
|
| 107 |
+
\subsection{D\'etails de l'Architecture}
|
| 108 |
+
|
| 109 |
+
\begin{table}[h]
|
| 110 |
+
\centering
|
| 111 |
+
\caption{Configurations des mod\`eles Julian. Tous les mod\`eles utilisent RoPE ($\theta$=10000), SwiGLU, RMSNorm (pr\'e-normalisation) et aucun terme de biais.}
|
| 112 |
+
\label{tab:model_configs}
|
| 113 |
+
\begin{tabular}{lccc}
|
| 114 |
+
\toprule
|
| 115 |
+
\textbf{Param\`etre} & \textbf{Julian-100M} & \textbf{Julian-250M$^\dagger$} & \textbf{Julian-600M} \\
|
| 116 |
+
\midrule
|
| 117 |
+
Dimension cach\'ee ($d_{\text{model}}$) & 640 & 1024 & 1280 \\
|
| 118 |
+
Couches ($L$) & 12 & 14 & 18 \\
|
| 119 |
+
T\^etes d'attention ($H$) & 10 & 16 & 20 \\
|
| 120 |
+
Dimension par t\^ete ($d_h$) & 64 & 64 & 64 \\
|
| 121 |
+
Dimension FFN ($d_{\text{ff}}$) & 2560 & 4096 & 5120 \\
|
| 122 |
+
Taille du vocabulaire ($V$) & 50\,000 & 50\,000 & 50\,000 \\
|
| 123 |
+
Longueur de contexte & 2048 & 2048 & 2048 \\
|
| 124 |
+
Pr\'ecision & bfloat16 & bfloat16 & bfloat16 \\
|
| 125 |
+
\bottomrule
|
| 126 |
+
\end{tabular}
|
| 127 |
+
\end{table}
|
| 128 |
+
|
| 129 |
+
\noindent{\small $^\dagger$ Julian-250M est actuellement en pr\'eparation et n'a pas encore \'et\'e entra\^in\'e.}
|
| 130 |
+
|
| 131 |
+
\paragraph{Rotary Position Embeddings (RoPE).}
|
| 132 |
+
Dans un Transformer, le mod\`ele doit savoir \`a quelle \emph{position} se trouve chaque token dans la s\'equence. Sans cette information, la phrase \og le chat mange la souris \fg{} et \og la souris mange le chat \fg{} seraient trait\'ees de mani\`ere identique. RoPE \citep{su2021roformer} encode cette information positionnelle en appliquant une \emph{rotation} aux vecteurs de requ\^ete (\emph{query}) et de cl\'e (\emph{key}) du m\'ecanisme d'attention. L'angle de rotation d\'epend de la position du token, ce qui permet au mod\`ele de distinguer les positions tout en pr\'eservant les propri\'et\'es alg\'ebriques utiles pour le calcul d'attention.
|
| 133 |
+
|
| 134 |
+
Formellement, pour la fr\'equence de base $\theta = 10\,000$ :
|
| 135 |
+
\begin{equation}
|
| 136 |
+
f_{\theta}(x, m) = \begin{pmatrix} x_1 \\ x_2 \\ \vdots \\ x_{d-1} \\ x_d \end{pmatrix} \odot \begin{pmatrix} \cos(m\theta_1) \\ \cos(m\theta_1) \\ \vdots \\ \cos(m\theta_{d/2}) \\ \cos(m\theta_{d/2}) \end{pmatrix} + \begin{pmatrix} -x_2 \\ x_1 \\ \vdots \\ -x_d \\ x_{d-1} \end{pmatrix} \odot \begin{pmatrix} \sin(m\theta_1) \\ \sin(m\theta_1) \\ \vdots \\ \sin(m\theta_{d/2}) \\ \sin(m\theta_{d/2}) \end{pmatrix}
|
| 137 |
+
\end{equation}
|
| 138 |
+
o\`u $\theta_i = \theta^{-2i/d}$ et $m$ est l'indice de position. L'op\'erateur $\odot$ d\'esigne le produit \'el\'ement par \'el\'ement (produit de Hadamard). Intuitivement, chaque paire de dimensions du vecteur est \og tourn\'ee \fg{} d'un angle proportionnel \`a la position, ce qui fait que le produit scalaire entre deux vecteurs d\'epend naturellement de leur distance relative dans la s\'equence.
|
| 139 |
+
|
| 140 |
+
\paragraph{R\'eseau Feed-Forward SwiGLU.}
|
| 141 |
+
Apr\`es le m\'ecanisme d'attention, chaque couche du Transformer poss\`ede un r\'eseau feed-forward (FFN) qui transforme la repr\'esentation de chaque token ind\'ependamment. SwiGLU \citep{shazeer2020glu} est une variante am\'elior\'ee du FFN standard qui utilise un m\'ecanisme de \og porte \fg{} (\emph{gating}). Au lieu d'appliquer simplement une transformation lin\'eaire suivie d'une activation, SwiGLU multiplie deux chemins de transformation :
|
| 142 |
+
\begin{equation}
|
| 143 |
+
\text{FFN}(x) = W_{\text{down}} \cdot (\text{SiLU}(W_{\text{gate}} x) \odot W_{\text{up}} x)
|
| 144 |
+
\end{equation}
|
| 145 |
+
o\`u $W_{\text{gate}}, W_{\text{up}} \in \mathbb{R}^{d_{\text{ff}} \times d_{\text{model}}}$ et $W_{\text{down}} \in \mathbb{R}^{d_{\text{model}} \times d_{\text{ff}}}$. La fonction SiLU (\emph{Sigmoid Linear Unit}), d\'efinie par $\text{SiLU}(x) = x \cdot \sigma(x)$, est une activation lisse qui combine les avantages de ReLU et des fonctions sigmoid. Le terme $W_{\text{gate}} x$ agit comme une porte qui d\'etermine quelles informations de $W_{\text{up}} x$ doivent \^etre transmises. Cette architecture introduit une projection suppl\'ementaire par rapport aux FFN standards, mais am\'eliore la qualit\'e du mod\`ele \`a calcul \'equivalent.
|
| 146 |
+
|
| 147 |
+
\paragraph{RMSNorm.}
|
| 148 |
+
La normalisation est cruciale dans les r\'eseaux profonds pour stabiliser l'entra\^inement. Sans normalisation, les valeurs des activations peuvent cro\^itre ou d\'ecro\^itre de mani\`ere incontr\^ol\'ee \`a travers les couches, rendant l'entra\^inement instable. RMSNorm (\emph{Root Mean Square Layer Normalization}) \citep{zhang2019root} est une version simplifi\'ee de LayerNorm qui ne recentre pas les activations (pas de soustraction de la moyenne), mais les renormalise uniquement par leur norme quadratique moyenne :
|
| 149 |
+
\begin{equation}
|
| 150 |
+
\text{RMSNorm}(x) = \frac{x}{\sqrt{\frac{1}{d}\sum_{i=1}^{d} x_i^2 + \epsilon}} \cdot \gamma
|
| 151 |
+
\end{equation}
|
| 152 |
+
o\`u $\gamma$ est un param\`etre d'\'echelle appris et $\epsilon = 10^{-6}$ est un terme de stabilit\'e num\'erique. Cette simplification r\'eduit le co\^ut computationnel tout en maintenant la stabilit\'e de l'entra\^inement. Nous utilisons la pr\'e-normalisation (\emph{pre-norm}), c'est-\`a-dire que RMSNorm est appliqu\'e \emph{avant} chaque sous-couche d'attention et de FFN, plut\^ot qu'apr\`es (ce qui \'etait la convention dans le Transformer original \citep{vaswani2017attention}).
|
| 153 |
+
|
| 154 |
+
\subsection{Tokenizer}
|
| 155 |
+
|
| 156 |
+
Un tokenizer est le composant qui convertit du texte brut en une s\'equence de nombres (tokens) que le mod\`ele peut traiter. Plut\^ot que de travailler au niveau des caract\`eres individuels (ce qui donnerait des s\'equences tr\`es longues) ou des mots entiers (ce qui n\'ecessiterait un vocabulaire \'enorme), les tokenizers modernes d\'ecoupent le texte en \emph{sous-mots}. Par exemple, le mot \og incompr\'ehensible \fg{} pourrait \^etre d\'ecoup\'e en \og in \fg, \og compr\'ehens \fg, \og ible \fg.
|
| 157 |
+
|
| 158 |
+
Nous entra\^inons un tokenizer SentencePiece \citep{kudo2018sentencepiece} de type BPE (\emph{Byte Pair Encoding}) avec un vocabulaire de 50\,000 tokens sur un \'echantillon \'equilibr\'e de notre corpus d'entra\^inement. Les param\`etres cl\'es incluent :
|
| 159 |
+
\begin{itemize}[leftmargin=*]
|
| 160 |
+
\item Couverture de caract\`eres : 99,99\,\%
|
| 161 |
+
\item Byte fallback activ\'e (g\`ere toute entr\'ee UTF-8, y compris les caract\`eres rares)
|
| 162 |
+
\item Tokens sp\'eciaux : \texttt{<pad>} (0), \texttt{<unk>} (1), \texttt{<s>} (2), \texttt{</s>} (3), \texttt{<|code|>} (4), \texttt{<|endcode|>} (5), \texttt{<|im\_start|>} (6), \texttt{<|im\_end|>} (7)
|
| 163 |
+
\end{itemize}
|
| 164 |
+
|
| 165 |
+
Les tokens de style ChatML (\texttt{<|im\_start|>} et \texttt{<|im\_end|>}) sont inclus d\`es le d\'ebut du pr\'e-entra\^inement pour supporter le fine-tuning d'instructions ult\'erieur sans expansion du vocabulaire. Cette d\'ecision de conception \'evite les probl\`emes d'embeddings non entra\^in\'es lors du SFT.
|
| 166 |
+
|
| 167 |
+
% ============================================================================
|
| 168 |
+
% 4. Donn\'ees d'Entra\^inement
|
| 169 |
+
% ============================================================================
|
| 170 |
+
\section{Donn\'ees d'Entra\^inement}
|
| 171 |
+
|
| 172 |
+
\subsection{Sources de Donn\'ees}
|
| 173 |
+
|
| 174 |
+
La qualit\'e et la diversit\'e des donn\'ees d'entra\^inement sont des facteurs d\'eterminants pour la performance d'un mod\`ele de langage. Nous constituons un corpus d'entra\^inement bilingue d'environ 39 milliards de tokens avec un ratio de 70\,\% d'anglais et 30\,\% de fran\c{c}ais (tableau~\ref{tab:data_sources}).
|
| 175 |
+
|
| 176 |
+
\begin{itemize}[leftmargin=*]
|
| 177 |
+
\item \textbf{Wikip\'edia} (EN + FR, 5,5B tokens) : texte encyclop\'edique factuel et bien structur\'e dans les deux langues.
|
| 178 |
+
\item \textbf{OSCAR 2301} (EN + FR, 15B tokens) : large corpus web multilingual extrait de Common Crawl, offrant de la diversit\'e linguistique mais avec un bruit plus important.
|
| 179 |
+
\item \textbf{FineWeb-Edu} (EN, 8B tokens) : corpus anglophone de haute qualit\'e filtr\'e pour son contenu \'educatif, contribuant significativement \`a la qualit\'e des repr\'esentations apprises.
|
| 180 |
+
\item \textbf{Projet Gutenberg} (EN + FR, 1B tokens) : textes litt\'eraires libres de droits.
|
| 181 |
+
\item \textbf{The Stack} (Multi, 2B tokens) : code source d\'edupliqu\'e provenant de d\'ep\^ots GitHub ouverts, permettant au mod\`ele d'acqu\'erir des comp\'etences basiques en compr\'ehension de code.
|
| 182 |
+
\end{itemize}
|
| 183 |
+
|
| 184 |
+
\begin{table}[H]
|
| 185 |
+
\centering
|
| 186 |
+
\caption{Composition des donn\'ees d'entra\^inement pour Julian-600M (39B tokens).}
|
| 187 |
+
\label{tab:data_sources}
|
| 188 |
+
\begin{tabular}{lccc}
|
| 189 |
+
\toprule
|
| 190 |
+
\textbf{Source} & \textbf{Langues} & \textbf{Tokens (approx.)} & \textbf{Qualit\'e} \\
|
| 191 |
+
\midrule
|
| 192 |
+
Wikip\'edia & EN + FR & 5,5B & \'Elev\'ee \\
|
| 193 |
+
OSCAR 2301 & EN + FR & 15B & Moyenne \\
|
| 194 |
+
FineWeb-Edu & EN & 8B & Tr\`es \'elev\'ee \\
|
| 195 |
+
Projet Gutenberg & EN + FR & 1B & \'Elev\'ee \\
|
| 196 |
+
The Stack (code) & Multi & 2B & \'Elev\'ee \\
|
| 197 |
+
\midrule
|
| 198 |
+
\textbf{Total} & & \textbf{$\sim$39B} & \\
|
| 199 |
+
\bottomrule
|
| 200 |
+
\end{tabular}
|
| 201 |
+
\end{table}
|
| 202 |
+
|
| 203 |
+
\subsection{Pipeline de Traitement des Donn\'ees}
|
| 204 |
+
|
| 205 |
+
Notre pipeline de traitement des donn\'ees comprend les \'etapes suivantes :
|
| 206 |
+
|
| 207 |
+
\begin{enumerate}[leftmargin=*]
|
| 208 |
+
\item \textbf{T\'el\'echargement} : Les donn\'ees brutes sont obtenues depuis les datasets HuggingFace (OSCAR, FineWeb-Edu, The Stack), les dumps Wikip\'edia et les miroirs du Projet Gutenberg.
|
| 209 |
+
\item \textbf{Nettoyage} : Les documents de moins de 100 caract\`eres ou de plus de 500K caract\`eres sont retir\'es. Nous imposons un ratio minimum de 70\,\% de caract\`eres alphanum\'eriques pour \'eliminer les documents principalement compos\'es de code HTML, de listes de liens ou de contenu non textuel.
|
| 210 |
+
\item \textbf{D\'eduplication} : Le MinHash Locality-Sensitive Hashing (LSH) avec un seuil de similarit\'e de Jaccard de 0,8 est utilis\'e pour la suppression des quasi-doublons. Cette technique permet de d\'etecter efficacement les documents similaires sans comparer chaque paire, ce qui serait prohibitif \`a grande \'echelle.
|
| 211 |
+
\item \textbf{D\'etection de langue} : Nous utilisons l'identification de langue fastText avec un seuil de confiance de 0,8 pour assurer un \'etiquetage linguistique correct et maintenir le ratio 70/30.
|
| 212 |
+
\item \textbf{Tokenisation} : Le corpus nettoy\'e est tokenis\'e avec notre tokenizer SentencePiece et empaquet\'e en s\'equences de 2048 tokens.
|
| 213 |
+
\item \textbf{Sharding} : Les donn\'ees tokenis\'ees sont d\'ecoup\'ees en 359 shards stock\'es sur Google Cloud Storage (GCS) pour le streaming pendant l'entra\^inement.
|
| 214 |
+
\end{enumerate}
|
| 215 |
+
|
| 216 |
+
% ============================================================================
|
| 217 |
+
% 5. Proc\'edure d'Entra\^inement
|
| 218 |
+
% ============================================================================
|
| 219 |
+
\section{Proc\'edure d'Entra\^inement}
|
| 220 |
+
|
| 221 |
+
\subsection{Infrastructure}
|
| 222 |
+
|
| 223 |
+
Tout l'entra\^inement est r\'ealis\'e sur des pods TPU v4-32 de Google Cloud (32 puces TPU r\'eparties sur 4 h\^otes) fournis dans le cadre du programme TPU Research Cloud (TRC). Les TPU (\emph{Tensor Processing Units}) sont des acc\'el\'erateurs mat\'eriels con\c{c}us par Google, sp\'ecifiquement optimis\'es pour les op\'erations matricielles qui constituent le c\oe{}ur du calcul des r\'eseaux de neurones. Contrairement aux GPU qui sont des processeurs g\'en\'eralistes adapt\'es au calcul parall\`ele, les TPU sont des ASIC (\emph{Application-Specific Integrated Circuits}) d\'edi\'es, offrant un meilleur rapport performance/watt pour l'entra\^inement de mod\`eles de langage.
|
| 224 |
+
|
| 225 |
+
Nous utilisons le framework JAX \citep{bradbury2018jax} avec Flax pour la d\'efinition du mod\`ele et Optax pour l'optimisation. JAX est un framework de calcul num\'erique qui combine la familiarit\'e de NumPy avec la compilation JIT (\emph{Just-In-Time}) et la diff\'erentiation automatique. Son principal avantage pour l'entra\^inement sur TPU est sa gestion native du parall\'elisme multi-device.
|
| 226 |
+
|
| 227 |
+
\subsection{Strat\'egie de Parall\'elisme}
|
| 228 |
+
|
| 229 |
+
L'entra\^inement d'un mod\`ele de 600M de param\`etres sur un seul acc\'el\'erateur serait possible mais extr\^emement lent. Pour acc\'el\'erer le processus, nous distribuons le calcul sur les 32 puces TPU. Nous employons le Fully Sharded Data Parallelism (FSDP) \citep{xu2021gspmd} via la primitive \texttt{pmap} de JAX. Concr\`etement, les param\`etres du mod\`ele sont r\'epliqu\'es sur tous les devices, tandis que la dimension du batch est fragment\'ee : chaque puce TPU traite une portion diff\'erente des donn\'ees. Les gradients sont ensuite agr\'eg\'es (moyenn\'es) entre toutes les puces avant la mise \`a jour des param\`etres.
|
| 230 |
+
|
| 231 |
+
L'accumulation de gradient sur 8 micro-pas permet d'atteindre une taille de batch effective de 1024 s\'equences (4 s\'equences par device $\times$ 32 devices $\times$ 8 pas d'accumulation). \`A 2048 tokens par s\'equence, chaque pas d'entra\^inement traite environ 2,1 millions de tokens.
|
| 232 |
+
|
| 233 |
+
\subsection{Optimiseur et Programme d'Apprentissage}
|
| 234 |
+
|
| 235 |
+
L'optimiseur est l'algorithme qui met \`a jour les poids du mod\`ele \`a chaque pas d'entra\^inement en fonction des gradients calcul\'es. Nous utilisons AdamW \citep{loshchilov2019decoupled}, une variante d'Adam qui d\'ecouple la r\'egularisation par d\'ecroissance des poids (\emph{weight decay}) de l'optimisation. AdamW maintient deux \og moments \fg{} pour chaque param\`etre : le premier moment $\mu$ (moyenne mobile des gradients) et le second moment $\nu$ (moyenne mobile des gradients au carr\'e), qui permettent d'adapter le taux d'apprentissage individuellement pour chaque param\`etre.
|
| 236 |
+
|
| 237 |
+
\paragraph{Budget de calcul.}
|
| 238 |
+
L'entra\^inement de Julian-600M n\'ecessite environ $2{,}4 \times 10^{19}$ FLOPs (estim\'es selon la formule $C \approx 6ND$ o\`u $N$ est le nombre de param\`etres et $D$ le nombre de tokens). Le temps d'entra\^inement total est d'environ 21 jours sur un pod TPU v4-32, avec une utilisation de mod\`ele (\emph{Model FLOPs Utilization}, MFU) d'environ 38\,\%.
|
| 239 |
+
|
| 240 |
+
\begin{table}[h]
|
| 241 |
+
\centering
|
| 242 |
+
\caption{Hyperparam\`etres de pr\'e-entra\^inement pour Julian-600M.}
|
| 243 |
+
\label{tab:hyperparams}
|
| 244 |
+
\begin{tabular}{lc}
|
| 245 |
+
\toprule
|
| 246 |
+
\textbf{Hyperparam\`etre} & \textbf{Valeur} \\
|
| 247 |
+
\midrule
|
| 248 |
+
Optimiseur & AdamW \\
|
| 249 |
+
$\beta_1$, $\beta_2$ & 0,9 ; 0,95 \\
|
| 250 |
+
$\epsilon$ & $10^{-8}$ \\
|
| 251 |
+
D\'ecroissance des poids & 0,1 \\
|
| 252 |
+
Taux d'apprentissage maximal & $1,2 \times 10^{-3}$ \\
|
| 253 |
+
Taux d'apprentissage minimal & $1,2 \times 10^{-4}$ (10\,\% du max) \\
|
| 254 |
+
Pas de warmup & 3\,000 \\
|
| 255 |
+
Pas totaux & 300\,000 \\
|
| 256 |
+
Programme du taux d'apprentissage & Cosine annealing \\
|
| 257 |
+
Gradient clipping & 1,0 (norme globale) \\
|
| 258 |
+
Taille de batch (par device) & 4 \\
|
| 259 |
+
Pas d'accumulation de gradient & 8 \\
|
| 260 |
+
Taille de batch effective & 1\,024 \\
|
| 261 |
+
Longueur de s\'equence & 2\,048 \\
|
| 262 |
+
Tokens par pas & $\sim$2,1M \\
|
| 263 |
+
Tokens totaux & $\sim$39B \\
|
| 264 |
+
Pr\'ecision & bfloat16 \\
|
| 265 |
+
\bottomrule
|
| 266 |
+
\end{tabular}
|
| 267 |
+
\end{table}
|
| 268 |
+
|
| 269 |
+
Nous suivons le programme cosinus de Chinchilla \citep{hoffmann2022training} : un warmup lin\'eaire de 0 au taux d'apprentissage maximal sur 3\,000 pas, suivi d'une d\'ecroissance en cosinus jusqu'\`a 10\,\% de la valeur maximale. Le \emph{warmup} est une phase critique o\`u le taux d'apprentissage augmente progressivement depuis z\'ero, permettant au mod\`ele de se stabiliser avant de recevoir des mises \`a jour plus agressives. La d\'ecroissance en cosinus r\'eduit ensuite progressivement le taux d'apprentissage, permettant au mod\`ele de converger finement.
|
| 270 |
+
|
| 271 |
+
Les \'etats de l'optimiseur ($\mu$ et $\nu$) sont stock\'es en bfloat16 pour r\'eduire la consommation m\'emoire d'environ 40\,\%. Le format bfloat16 (Brain Floating Point 16-bit) \citep{micikevicius2018mixed} utilise 16 bits au lieu de 32, r\'eduisant la m\'emoire de moiti\'e avec une perte de pr\'ecision n\'egligeable pour l'entra\^inement.
|
| 272 |
+
|
| 273 |
+
\subsection{Robustesse}
|
| 274 |
+
|
| 275 |
+
L'entra\^inement sur des instances TPU pr\'eemptibles (\emph{spot instances}, qui peuvent \^etre interrompues \`a tout moment par le fournisseur cloud pour lib\'erer des ressources) n\'ecessite une gestion robuste des checkpoints. Nous impl\'ementons :
|
| 276 |
+
\begin{itemize}[leftmargin=*]
|
| 277 |
+
\item \textbf{Checkpointing asynchrone} via Orbax, sauvegardant tous les 10\,000 pas sans bloquer l'entra\^inement. L'\'ecriture des checkpoints se fait en arri\`ere-plan tandis que le calcul continue.
|
| 278 |
+
\item \textbf{Gestionnaire SIGTERM} : Lors d'une pr\'eemption, le syst\`eme d'exploitation envoie un signal SIGTERM. Notre gestionnaire \'ecrit un checkpoint d'urgence dans la p\'eriode de gr\^ace de 30 secondes avant l'arr\^et forc\'e.
|
| 279 |
+
\item \textbf{Monitoring de sant\'e} : D\'etection automatique des valeurs NaN/Inf dans les gradients et la loss, avec logique de disjoncteur (\emph{circuit breaker}) pour les tentatives de r\'ecup\'eration.
|
| 280 |
+
\item \textbf{Synchronisation globale} : Barri\`ere de synchronisation JAX avant les \'ecritures de checkpoint pour assurer la coh\'erence multi-h\^ote. Sans cette synchronisation, les h\^otes pourraient sauvegarder des \'etats \`a des pas diff\'erents, corrompant le checkpoint.
|
| 281 |
+
\end{itemize}
|
| 282 |
+
|
| 283 |
+
% ============================================================================
|
| 284 |
+
% 6. Supervised Fine-Tuning
|
| 285 |
+
% ============================================================================
|
| 286 |
+
\section{Supervised Fine-Tuning}
|
| 287 |
+
|
| 288 |
+
Le pr\'e-entra\^inement produit un mod\`ele capable de pr\'edire le prochain token dans un texte, c'est-\`a-dire un \og compl\'eteur de texte \fg{} : si on lui donne le d\'ebut d'un article Wikip\'edia, il peut le continuer de mani\`ere coh\'erente. Cependant, ce mod\`ele ne sait pas r\'epondre \`a des questions ou suivre des instructions. Le \emph{Supervised Fine-Tuning} (SFT) transforme ce compl\'eteur de texte en \og assistant \fg{} en le r\'e-entra\^inant sur des exemples de conversations instruction-r\'eponse.
|
| 289 |
+
|
| 290 |
+
Nous effectuons le SFT sur le checkpoint pr\'e-entra\^in\'e de Julian-600M (pas 300\,000, soit 39B tokens vus).
|
| 291 |
+
|
| 292 |
+
\subsection{Dataset d'Instructions}
|
| 293 |
+
|
| 294 |
+
Notre dataset SFT comprend 2,47 millions de paires instruction-r\'eponse issues de multiples sources :
|
| 295 |
+
|
| 296 |
+
\begin{table}[H]
|
| 297 |
+
\centering
|
| 298 |
+
\caption{Composition du dataset SFT.}
|
| 299 |
+
\label{tab:sft_data}
|
| 300 |
+
\begin{tabular}{lcc}
|
| 301 |
+
\toprule
|
| 302 |
+
\textbf{Source} & \textbf{Exemples (approx.)} & \textbf{Langue} \\
|
| 303 |
+
\midrule
|
| 304 |
+
Stanford Alpaca & 52K & Anglais \\
|
| 305 |
+
Databricks Dolly 15K & 15K & Anglais \\
|
| 306 |
+
Code Alpaca & 20K & Anglais \\
|
| 307 |
+
GPT4All-J & 20K & Anglais \\
|
| 308 |
+
Donn\'ees d'instructions fran\c{c}aises & 15K+ & Fran\c{c}ais \\
|
| 309 |
+
OpenHermes 2.5 & $\sim$900K & Anglais \\
|
| 310 |
+
SlimOrca & $\sim$500K & Anglais \\
|
| 311 |
+
Autres donn\'ees synth\'etiques & $\sim$900K & Multilingue \\
|
| 312 |
+
\midrule
|
| 313 |
+
\textbf{Total} & \textbf{2,47M} & \\
|
| 314 |
+
\bottomrule
|
| 315 |
+
\end{tabular}
|
| 316 |
+
\end{table}
|
| 317 |
+
|
| 318 |
+
\subsection{Format ChatML}
|
| 319 |
+
|
| 320 |
+
Toutes les donn\'ees d'instructions sont format\'ees avec le template ChatML \citep{openai2023chatml}. Ce format structure la conversation en segments clairement d\'elimit\'es par les tokens sp\'eciaux \texttt{<|im\_start|>} et \texttt{<|im\_end|>} :
|
| 321 |
+
|
| 322 |
+
\smallskip\noindent\begin{minipage}{\textwidth}
|
| 323 |
+
\begin{Verbatim}[fontsize=\small, vspace=0pt]
|
| 324 |
+
<|im_start|>system
|
| 325 |
+
You are a helpful assistant.<|im_end|>
|
| 326 |
+
<|im_start|>user
|
| 327 |
+
{instruction}<|im_end|>
|
| 328 |
+
<|im_start|>assistant
|
| 329 |
+
{response}<|im_end|>
|
| 330 |
+
\end{Verbatim}
|
| 331 |
+
\end{minipage}
|
| 332 |
+
\smallskip\noindent Pendant le SFT, la loss est calcul\'ee \emph{uniquement} sur les tokens de r\'eponse de l'assistant en utilisant un masque de loss binaire. Les tokens du syst\`eme et de l'utilisateur re\c{c}oivent un poids de loss nul, ce qui assure que le mod\`ele apprend \`a \emph{g\'en\'erer} des r\'eponses plut\^ot qu'\`a m\'emoriser les instructions.
|
| 333 |
+
|
| 334 |
+
\subsection{Hyperparam\`etres du SFT}
|
| 335 |
+
|
| 336 |
+
\begin{table}[h]
|
| 337 |
+
\centering
|
| 338 |
+
\caption{Hyperparam\`etres d'entra\^inement SFT.}
|
| 339 |
+
\label{tab:sft_hyperparams}
|
| 340 |
+
\begin{tabular}{lc}
|
| 341 |
+
\toprule
|
| 342 |
+
\textbf{Hyperparam\`etre} & \textbf{Valeur} \\
|
| 343 |
+
\midrule
|
| 344 |
+
Checkpoint de base & pas 300\,000 (39B tokens) \\
|
| 345 |
+
Taux d'apprentissage & $2 \times 10^{-5}$ \\
|
| 346 |
+
Pas de warmup & 1\,000 \\
|
| 347 |
+
Taille de batch (effective) & 32--256 \\
|
| 348 |
+
Longueur de s\'equence & 2\,048 \\
|
| 349 |
+
D\'ecroissance des poids & 0,01 \\
|
| 350 |
+
Gradient clipping & 1,0 \\
|
| 351 |
+
\bottomrule
|
| 352 |
+
\end{tabular}
|
| 353 |
+
\end{table}
|
| 354 |
+
|
| 355 |
+
Nous entra\^inons deux variantes SFT avec des dur\'ees diff\'erentes :
|
| 356 |
+
\begin{itemize}[leftmargin=*]
|
| 357 |
+
\item \textbf{SFT-30K} : 30\,000 pas. Calcul : $30\,000 \times 32 \times 2048 = 1{,}97$ milliards de tokens vus, soit 0,66 \'epoque. Loss finale : 1,86.
|
| 358 |
+
\item \textbf{SFT-100K} : 100\,000 pas. Calcul : $100\,000 \times 32 \times 2048 = 6{,}55$ milliards de tokens vus, soit 2,20 \'epoques (chaque exemple vu en moyenne 2,2 fois). Loss finale : 1,69.
|
| 359 |
+
\end{itemize}
|
| 360 |
+
|
| 361 |
+
Une \'epoque repr\'esente un passage complet \`a travers le dataset. Avec 2,47M d'exemples et un batch de 32, une \'epoque compl\`ete correspond \`a environ 45\,383 pas ($2{,}47\text{M} / 32$).
|
| 362 |
+
|
| 363 |
+
Une variante ant\'erieure, \textbf{Julian-600M-10B-Instruct-v0.1}, a \'et\'e fine-tun\'ee \`a partir d'un checkpoint interm\'ediaire du pr\'e-entra\^inement (pas 100\,000, $\sim$10B tokens) sur un dataset d'instructions plus petit ($\sim$185K exemples, 5\,500 pas). Cette variante sert de ligne de base pour la comparaison.
|
| 364 |
+
|
| 365 |
+
% ============================================================================
|
| 366 |
+
% 7. \'Evaluation
|
| 367 |
+
% ============================================================================
|
| 368 |
+
\section{\'Evaluation}
|
| 369 |
+
|
| 370 |
+
\subsection{Suite de Benchmarks}
|
| 371 |
+
|
| 372 |
+
Les benchmarks sont des tests standardis\'es qui mesurent diff\'erentes capacit\'es d'un mod\`ele de langage. Nous \'evaluons tous les mod\`eles Julian en mode zero-shot (sans exemples fournis au mod\`ele) en utilisant le Language Model Evaluation Harness \citep{gao2023framework} :
|
| 373 |
+
|
| 374 |
+
\begin{itemize}[leftmargin=*]
|
| 375 |
+
\item \textbf{HellaSwag} \citep{zellers2019hellaswag} : Inf\'erence en langage naturel par sens commun. Le mod\`ele doit choisir la suite la plus plausible d'un sc\'enario parmi 4 propositions. Exemple : \og Une personne entre dans une cuisine et ouvre le r\'efrig\'erateur. Elle...\fg{} suivi de 4 fins possibles. Nous rapportons la pr\'ecision normalis\'ee par la longueur (acc\_norm).
|
| 376 |
+
\item \textbf{PIQA} \citep{bisk2020piqa} : Questions-r\'eponses sur l'intuition physique. Le mod\`ele doit choisir la m\'ethode correcte pour accomplir un objectif physique. Exemple : \og Pour s\'eparer un \oe{}uf, vous devriez...\fg{} Nous rapportons la pr\'ecision (acc).
|
| 377 |
+
\item \textbf{LAMBADA} \citep{paperno2016lambada} : Pr\'ediction du dernier mot d'un passage n\'ecessitant une compr\'ehension du contexte large. Ce benchmark mesure la capacit\'e du mod\`ele \`a utiliser un contexte long pour pr\'edire un mot sp\'ecifique. Nous rapportons la pr\'ecision (acc).
|
| 378 |
+
\item \textbf{ARC-Easy / ARC-Challenge} \citep{clark2018think} : Questions de sciences (niveau primaire/coll\`ege). ARC-Challenge contient les questions auxquelles les algorithmes de r\'ecup\'eration d'information \'echouent, testant le raisonnement plut\^ot que la m\'emorisation. Nous rapportons acc / acc\_norm respectivement.
|
| 379 |
+
\item \textbf{WinoGrande} \citep{sakaguchi2020winogrande} : R\'esolution de cor\'ef\'erence par sens commun. Le mod\`ele doit d\'eterminer \`a quoi se r\'ef\`ere un pronom dans une phrase ambigu\"e. Exemple : \og Le trophée ne rentrait pas dans la valise parce qu'\emph{il} \'etait trop grand \fg{} --- \og il \fg{} d\'esigne-t-il le troph\'ee ou la valise ? Nous rapportons la pr\'ecision (acc).
|
| 380 |
+
\item \textbf{BoolQ} \citep{clark2019boolq} : Questions oui/non naturelles extraites de requ\^etes Google r\'eelles, associ\'ees \`a des passages Wikip\'edia. Nous rapportons la pr\'ecision (acc).
|
| 381 |
+
\end{itemize}
|
| 382 |
+
|
| 383 |
+
\subsection{Infrastructure d'\'Evaluation}
|
| 384 |
+
|
| 385 |
+
Un d\'efi technique notable : le harness standard lm-eval avec les mod\`eles HuggingFace utilise par d\'efaut PyTorch en mode CPU lorsqu'il est ex\'ecut\'e sur des VM TPU (pas de CUDA disponible). Cela rend l'\'evaluation extr\^emement lente ($\sim$7 minutes par item). Pour contourner cette limitation, nous impl\'ementons un wrapper d'\'evaluation JAX custom qui effectue l'inf\'erence directement sur TPU. Ce wrapper atteint environ 5,8 items/seconde avec un batch de 48, compl\'etant la suite d'\'evaluation compl\`ete ($\sim$72K requ\^etes) en environ 3,5 heures sur un seul pod TPU v4-32.
|
| 386 |
+
|
| 387 |
+
% ============================================================================
|
| 388 |
+
% 8. R\'esultats
|
| 389 |
+
% ============================================================================
|
| 390 |
+
\section{R\'esultats}
|
| 391 |
+
|
| 392 |
+
\subsection{Progression des Mod\`eles Julian}
|
| 393 |
+
|
| 394 |
+
Le tableau~\ref{tab:julian_results} pr\'esente les r\'esultats de benchmarks \`a travers toutes les variantes du mod\`ele Julian, illustrant l'impact du pr\'e-entra\^inement additionnel et du fine-tuning supervis\'e.
|
| 395 |
+
|
| 396 |
+
\begin{table}[H]
|
| 397 |
+
\centering
|
| 398 |
+
\caption{R\'esultats des benchmarks (0-shot) pour les variantes du mod\`ele Julian. Les valeurs en gras indiquent le meilleur score parmi les mod\`eles Julian pour chaque benchmark.}
|
| 399 |
+
\label{tab:julian_results}
|
| 400 |
+
\resizebox{\textwidth}{!}{
|
| 401 |
+
\begin{tabular}{llccccccccc}
|
| 402 |
+
\toprule
|
| 403 |
+
\textbf{Mod\`ele} & \textbf{Base} & \textbf{SFT} & \textbf{Loss} & \textbf{HS} & \textbf{PIQA} & \textbf{LAM.} & \textbf{ARC-E} & \textbf{ARC-C} & \textbf{WG} & \textbf{BoolQ} \\
|
| 404 |
+
\midrule
|
| 405 |
+
Base 10B (ckpt 100K) & 10B & --- & 3,20 & 45,8 & 67,6 & 35,0 & --- & --- & --- & --- \\
|
| 406 |
+
Base 39B (ckpt 300K) & 39B & --- & 2,33 & \textbf{53,5} & 66,8 & 37,3 & --- & --- & --- & --- \\
|
| 407 |
+
Instruct v0.1 (base 10B) & $\sim$10B & 5,5K & 5,01 & 42,7 & 66,2 & 34,6 & --- & --- & --- & --- \\
|
| 408 |
+
SFT-30K (base 39B) & 39B & 30K & 1,86 & 41,7 & \textbf{66,8} & \textbf{37,7} & 53,5 & \textbf{27,1} & \textbf{53,8} & 60,6 \\
|
| 409 |
+
SFT-100K (base 39B) & 39B & 100K & 1,69 & 41,6 & 66,6 & \textbf{37,7} & \textbf{53,8} & 26,7 & 52,8 & \textbf{60,8} \\
|
| 410 |
+
\bottomrule
|
| 411 |
+
\end{tabular}
|
| 412 |
+
}
|
| 413 |
+
\end{table}
|
| 414 |
+
|
| 415 |
+
Pour r\'ef\'erence, le checkpoint brut 170K (interm\'ediaire de pr\'e-entra\^inement, $\sim$22B tokens) obtient : HS=39,0, PIQA=66,2, LAM.=34,7, ARC-E=56,1, ARC-C=26,5, WG=51,0, BoolQ=59,0.
|
| 416 |
+
|
| 417 |
+
\subsection{Comparaison avec les Mod\`eles Existants}
|
| 418 |
+
|
| 419 |
+
Le tableau~\ref{tab:comparison} compare Julian-600M avec des mod\`eles publiquement disponibles de taille similaire ou sup\'erieure.
|
| 420 |
+
|
| 421 |
+
\begin{table}[H]
|
| 422 |
+
\centering
|
| 423 |
+
\caption{Comparaison avec les mod\`eles existants (0-shot). Julian-600M Base surpasse OPT-1.3B sur HellaSwag malgr\'e 2$\times$ moins de param\`etres et 8$\times$ moins de tokens d'entra\^inement.}
|
| 424 |
+
\label{tab:comparison}
|
| 425 |
+
\resizebox{\textwidth}{!}{
|
| 426 |
+
\begin{tabular}{lccccccccc}
|
| 427 |
+
\toprule
|
| 428 |
+
\textbf{Mod\`ele} & \textbf{Param.} & \textbf{Tokens} & \textbf{HS} & \textbf{PIQA} & \textbf{LAM.} & \textbf{ARC-E} & \textbf{ARC-C} & \textbf{WG} \\
|
| 429 |
+
\midrule
|
| 430 |
+
GPT-2 Small & 124M & 100B+ & 31,5 & --- & 46,0 & --- & --- & 50,4 \\
|
| 431 |
+
OPT-125M & 125M & 300B & 29,2 & 63,0 & 37,9 & 43,5 & 18,9 & 50,3 \\
|
| 432 |
+
OPT-350M & 331M & 300B & 32,0 & 64,4 & 45,2 & 44,0 & 20,7 & 52,3 \\
|
| 433 |
+
Pythia-410M & 405M & 300B & 33,3 & 66,8 & 50,5 & 50,4 & 21,3 & 53,0 \\
|
| 434 |
+
\midrule
|
| 435 |
+
\textbf{Julian-600M Base} & \textbf{600M} & \textbf{39B} & \textbf{53,5} & \textbf{66,8} & 37,3 & --- & --- & --- \\
|
| 436 |
+
\textbf{Julian-600M SFT-30K} & \textbf{600M} & \textbf{39B+2B} & 41,7 & \textbf{66,8} & \textbf{37,7} & \textbf{53,5} & \textbf{27,1} & \textbf{53,8} \\
|
| 437 |
+
\midrule
|
| 438 |
+
GPT-2 XL & 1\,558M & 100B+ & 50,9 & 70,8 & 63,2 & --- & --- & 59,4 \\
|
| 439 |
+
Pythia-1B & 1B & 300B & 37,6 & 70,5 & 56,6 & 55,9 & 24,3 & 54,5 \\
|
| 440 |
+
OPT-1.3B & 1,3B & 300B & 41,5 & 71,7 & 57,9 & 57,0 & 23,4 & 59,5 \\
|
| 441 |
+
\bottomrule
|
| 442 |
+
\end{tabular}
|
| 443 |
+
}
|
| 444 |
+
\end{table}
|
| 445 |
+
|
| 446 |
+
\paragraph{R\'esultats cl\'es.}
|
| 447 |
+
|
| 448 |
+
\begin{itemize}[leftmargin=*]
|
| 449 |
+
\item \textbf{HellaSwag} : Julian-600M Base atteint 53,5\,\%, surpassant GPT-2~XL (50,9\,\%, 1,5B param\`etres), OPT-1.3B (41,5\,\%) et Pythia-1B (37,6\,\%). C'est un r\'esultat remarquable pour un mod\`ele de 600M entra\^in\'e sur seulement 39B tokens.
|
| 450 |
+
\item \textbf{PIQA} : Julian-600M \'egale Pythia-410M \`a 66,8\,\% et se situe l\'eg\`erement en dessous des mod\`eles 2--3$\times$ plus grands.
|
| 451 |
+
\item \textbf{LAMBADA} : Julian-600M atteint 37,3\,\%, inf\'erieur aux mod\`eles de taille similaire entra\^in\'es sur plus de donn\'ees. LAMBADA est particuli\`erement sensible au volume et \`a la diversit\'e du texte d'entra\^inement, ce qui explique probablement cet \'ecart.
|
| 452 |
+
\item \textbf{Efficacit\'e en tokens} : Julian-600M atteint son score HellaSwag avec 39B tokens, tandis que les mod\`eles OPT et Pythia ont \'et\'e entra\^in\'es sur 300B tokens (7,7$\times$ plus).
|
| 453 |
+
\end{itemize}
|
| 454 |
+
|
| 455 |
+
\begin{figure}[t]
|
| 456 |
+
\centering
|
| 457 |
+
\begin{tikzpicture}
|
| 458 |
+
\begin{axis}[
|
| 459 |
+
xbar,
|
| 460 |
+
bar width=7pt,
|
| 461 |
+
width=0.88\textwidth,
|
| 462 |
+
height=6cm,
|
| 463 |
+
xlabel={HellaSwag (acc\_norm, \%)},
|
| 464 |
+
ytick={0,1,2,3,4,5,6,7},
|
| 465 |
+
yticklabels={
|
| 466 |
+
{OPT-125M {\scriptsize(125M, 300B tok)}},
|
| 467 |
+
{GPT-2 Small {\scriptsize(124M, 100B+ tok)}},
|
| 468 |
+
{OPT-350M {\scriptsize(331M, 300B tok)}},
|
| 469 |
+
{Pythia-410M {\scriptsize(405M, 300B tok)}},
|
| 470 |
+
{Pythia-1B {\scriptsize(1B, 300B tok)}},
|
| 471 |
+
{OPT-1.3B {\scriptsize(1,3B, 300B tok)}},
|
| 472 |
+
{GPT-2 XL {\scriptsize(1,5B, 100B+ tok)}},
|
| 473 |
+
{\textbf{Julian-600M} {\scriptsize\textbf{(600M, 39B tok)}}}
|
| 474 |
+
},
|
| 475 |
+
xmin=25, xmax=58,
|
| 476 |
+
nodes near coords,
|
| 477 |
+
nodes near coords style={font=\scriptsize, anchor=west},
|
| 478 |
+
enlarge y limits=0.1,
|
| 479 |
+
xmajorgrids=true,
|
| 480 |
+
grid style={gray!20},
|
| 481 |
+
y tick label style={font=\footnotesize},
|
| 482 |
+
]
|
| 483 |
+
\addplot[fill=gray!40, draw=gray!60] coordinates {
|
| 484 |
+
(29.2,0) (31.5,1) (32.0,2) (33.3,3) (37.6,4) (41.5,5) (50.9,6) (53.5,7)
|
| 485 |
+
};
|
| 486 |
+
\end{axis}
|
| 487 |
+
\end{tikzpicture}
|
| 488 |
+
\caption{Pr\'ecision HellaSwag (acc\_norm) compar\'ee entre mod\`eles, tri\'ee par score. Les nombres entre parenth\`eses indiquent le nombre de param\`etres et le volume de donn\'ees d'entra\^inement. Julian-600M obtient le score le plus \'elev\'e malgr\'e moins de param\`etres et significativement moins de donn\'ees que la plupart des mod\`eles de comparaison.}
|
| 489 |
+
\label{fig:hellaswag_comparison}
|
| 490 |
+
\end{figure}
|
| 491 |
+
|
| 492 |
+
% ============================================================================
|
| 493 |
+
% 9. Interpr\'etation des R\'esultats
|
| 494 |
+
% ============================================================================
|
| 495 |
+
\section{Interpr\'etation des R\'esultats}
|
| 496 |
+
|
| 497 |
+
Cette section propose une analyse approfondie des r\'esultats pr\'esent\'es ci-dessus, en examinant les dynamiques du pr\'e-entra\^inement, l'impact du SFT et les ph\'enom\`enes de saturation observ\'es.
|
| 498 |
+
|
| 499 |
+
\subsection{Progression du Pr\'e-entra\^inement}
|
| 500 |
+
|
| 501 |
+
L'\'evolution des performances entre les deux checkpoints de pr\'e-entra\^inement r\'ev\`ele une dynamique d'apprentissage soutenue. Entre le checkpoint \`a 10B tokens (pas 100\,000) et le checkpoint final \`a 39B tokens (pas 300\,000), nous observons :
|
| 502 |
+
|
| 503 |
+
\begin{itemize}[leftmargin=*]
|
| 504 |
+
\item \textbf{HellaSwag} : 45,8\,\% $\rightarrow$ 53,5\,\% (+7,7 points)
|
| 505 |
+
\item \textbf{Loss} : 3,20 $\rightarrow$ 2,33 ($-$27\,\%)
|
| 506 |
+
\item \textbf{PIQA} : 67,6\,\% $\rightarrow$ 66,8\,\% ($-$0,8 point)
|
| 507 |
+
\item \textbf{LAMBADA} : 35,0\,\% $\rightarrow$ 37,3\,\% (+2,3 points)
|
| 508 |
+
\end{itemize}
|
| 509 |
+
|
| 510 |
+
La progression de +7,7 points sur HellaSwag est particuli\`erement significative. Ce benchmark mesure la capacit\'e de raisonnement par sens commun, et l'am\'elioration continue sugg\`ere que le mod\`ele n'a pas atteint sa capacit\'e maximale d'apprentissage \`a 39B tokens. La loss qui continue de d\'ecro\^itre de mani\`ere substantielle (de 3,20 \`a 2,33) confirme l'absence de saturation : le mod\`ele continue d'apprendre efficacement \`a chaque pas d'entra\^inement suppl\'ementaire.
|
| 511 |
+
|
| 512 |
+
Il est int\'eressant de noter la l\'eg\`ere baisse de PIQA ($-$0,8 point), qui pourrait refl\'eter une redistribution de la capacit\'e du mod\`ele \`a mesure qu'il apprend des repr\'esentations plus complexes. Ce ph\'enom\`ene, parfois appel\'e \og interf\'erence catastrophique \fg{} dans sa forme extr\^eme, est ici b\'enin et compens\'e par les gains substantiels sur d'autres m\'etriques.
|
| 513 |
+
|
| 514 |
+
En extrapolant cette trajectoire, on peut raisonnablement s'attendre \`a ce qu'un entra\^inement continu au-del\`a de 39B tokens apporte des am\'eliorations suppl\'ementaires, particuli\`erement sur LAMBADA o\`u Julian-600M reste en retrait par rapport aux mod\`eles entra\^in\'es sur 300B tokens.
|
| 515 |
+
|
| 516 |
+
\subsection{Impact du SFT sur les Capacit\'es du Mod\`ele}
|
| 517 |
+
|
| 518 |
+
Le SFT transforme fondamentalement le comportement du mod\`ele : d'un \og compl\'eteur de texte \fg{} qui pr\'edit statistiquement le prochain token, il devient un \og assistant \fg{} capable de r\'epondre \`a des instructions structur\'ees. Cette transformation a un co\^ut mesurable sur les benchmarks.
|
| 519 |
+
|
| 520 |
+
\paragraph{Le sacrifice HellaSwag.} La baisse la plus notable est celle de HellaSwag : $-$11,8 points (53,5\,\% $\rightarrow$ 41,7\,\%). Ce ph\'enom\`ene est bien document\'e dans la litt\'erature \citep{ouyang2022training} et s'explique par la nature m\^eme du SFT. HellaSwag mesure la capacit\'e du mod\`ele \`a compl\'eter naturellement un texte ; or, le SFT r\'eoriente le mod\`ele vers la production de r\'eponses dans un format conversationnel sp\'ecifique (ChatML). Le mod\`ele \og d\'esapprend \fg{} partiellement la compl\'etion libre au profit du suivi d'instructions. C'est un compromis attendu et g\'en\'eralement accept\'e.
|
| 521 |
+
|
| 522 |
+
\paragraph{Stabilit\'e du raisonnement.} En revanche, les benchmarks mesurant le raisonnement sont remarquablement stables apr\`es le SFT :
|
| 523 |
+
\begin{itemize}[leftmargin=*]
|
| 524 |
+
\item \textbf{PIQA} reste \`a 66,8\,\% (identique au mod\`ele de base), indiquant que l'intuition physique n'est pas affect\'ee.
|
| 525 |
+
\item \textbf{WinoGrande} atteint 53,8\,\% (non mesur\'e sur le mod\`ele de base, mais comparable aux mod\`eles de r\'ef\'erence).
|
| 526 |
+
\item \textbf{ARC-Challenge} \`a 27,1\,\% se situe dans la plage attendue pour un mod\`ele de 600M.
|
| 527 |
+
\end{itemize}
|
| 528 |
+
|
| 529 |
+
Ces r\'esultats sugg\`erent que le SFT n'alt\`ere pas les capacit\'es de raisonnement sous-jacentes du mod\`ele, mais modifie principalement la \emph{distribution de sortie} (le format des r\'eponses g\'en\'er\'ees).
|
| 530 |
+
|
| 531 |
+
\paragraph{Am\'elioration sur LAMBADA.} Fait notable, LAMBADA s'am\'eliore l\'eg\`erement apr\`es le SFT (+0,4 point, de 37,3\,\% \`a 37,7\,\%). Ce r\'esultat, a priori contre-intuitif, peut s'expliquer par le fait que le format instruction-r\'eponse encourage le mod\`ele \`a mieux exploiter le contexte fourni pour produire une r\'eponse pr\'ecise --- exactement ce que LAMBADA mesure (pr\'edire un mot \`a partir d'un contexte long).
|
| 532 |
+
|
| 533 |
+
\subsection{Le Sur-SFT : Analyse Quantitative (30K vs 100K)}
|
| 534 |
+
|
| 535 |
+
La comparaison entre SFT-30K et SFT-100K constitue l'un des r\'esultats les plus instructifs de ce travail. Le tableau~\ref{tab:sft_delta} pr\'esente le d\'etail des diff\'erences.
|
| 536 |
+
|
| 537 |
+
\begin{table}[H]
|
| 538 |
+
\centering
|
| 539 |
+
\caption{Comparaison d\'etaill\'ee entre SFT-30K et SFT-100K. $\Delta$ repr\'esente la diff\'erence (100K $-$ 30K). Le SFT-100K utilise 3,3$\times$ plus de compute pour des r\'esultats quasi identiques.}
|
| 540 |
+
\label{tab:sft_delta}
|
| 541 |
+
\begin{tabular}{lccccc}
|
| 542 |
+
\toprule
|
| 543 |
+
\textbf{Benchmark} & \textbf{SFT-30K} & \textbf{SFT-100K} & \textbf{$\Delta$} & \textbf{Tokens SFT} & \textbf{\'Epoques} \\
|
| 544 |
+
\midrule
|
| 545 |
+
Loss & 1,86 & 1,69 & $-$0,17 & --- & --- \\
|
| 546 |
+
HellaSwag & 41,7\,\% & 41,6\,\% & $-$0,1 & --- & --- \\
|
| 547 |
+
PIQA & 66,8\,\% & 66,6\,\% & $-$0,2 & --- & --- \\
|
| 548 |
+
LAMBADA & 37,7\,\% & 37,7\,\% & 0,0 & --- & --- \\
|
| 549 |
+
ARC-Easy & 53,5\,\% & 53,8\,\% & +0,3 & --- & --- \\
|
| 550 |
+
ARC-Challenge & 27,1\,\% & 26,7\,\% & $-$0,4 & --- & --- \\
|
| 551 |
+
WinoGrande & 53,8\,\% & 52,8\,\% & \textbf{$-$1,0} & --- & --- \\
|
| 552 |
+
BoolQ & 60,6\,\% & 60,8\,\% & +0,2 & --- & --- \\
|
| 553 |
+
\midrule
|
| 554 |
+
& & & & 1,97B vs 6,55B & 0,66 vs 2,20 \\
|
| 555 |
+
\bottomrule
|
| 556 |
+
\end{tabular}
|
| 557 |
+
\end{table}
|
| 558 |
+
|
| 559 |
+
\begin{figure}[t]
|
| 560 |
+
\centering
|
| 561 |
+
\begin{tikzpicture}
|
| 562 |
+
\begin{axis}[
|
| 563 |
+
ybar=8pt,
|
| 564 |
+
bar width=12pt,
|
| 565 |
+
width=\textwidth,
|
| 566 |
+
height=6.5cm,
|
| 567 |
+
ylabel={Pr\'ecision (\%)},
|
| 568 |
+
symbolic x coords={HellaSwag, PIQA, LAMBADA},
|
| 569 |
+
xtick=data,
|
| 570 |
+
ymin=30, ymax=72,
|
| 571 |
+
nodes near coords,
|
| 572 |
+
nodes near coords style={font=\scriptsize, /pgf/number format/fixed, /pgf/number format/precision=1, anchor=south},
|
| 573 |
+
legend style={at={(0.5,-0.15)}, anchor=north, legend columns=3, font=\small},
|
| 574 |
+
enlarge x limits=0.35,
|
| 575 |
+
ymajorgrids=true,
|
| 576 |
+
grid style={gray!15},
|
| 577 |
+
]
|
| 578 |
+
\addplot[fill=blue!25, draw=blue!50] coordinates {
|
| 579 |
+
(HellaSwag, 53.5) (PIQA, 66.8) (LAMBADA, 37.3)
|
| 580 |
+
};
|
| 581 |
+
\addplot[fill=orange!30, draw=orange!55] coordinates {
|
| 582 |
+
(HellaSwag, 41.7) (PIQA, 66.8) (LAMBADA, 37.7)
|
| 583 |
+
};
|
| 584 |
+
\addplot[fill=red!20, draw=red!45] coordinates {
|
| 585 |
+
(HellaSwag, 41.6) (PIQA, 66.6) (LAMBADA, 37.7)
|
| 586 |
+
};
|
| 587 |
+
\legend{Base 39B, {SFT-30K (0,66 \'ep.)}, {SFT-100K (2,2 \'ep.)}}
|
| 588 |
+
\end{axis}
|
| 589 |
+
\end{tikzpicture}
|
| 590 |
+
\caption{Impact du fine-tuning supervis\'e sur les performances aux benchmarks. Le SFT provoque une chute significative de HellaSwag ($-$11,8 points) tout en pr\'eservant PIQA et en am\'eliorant l\'eg\`erement LAMBADA. SFT-30K et SFT-100K obtiennent des r\'esultats quasi identiques malgr\'e 3,3$\times$ plus de calcul, indiquant une saturation claire.}
|
| 591 |
+
\label{fig:sft_impact}
|
| 592 |
+
\end{figure}
|
| 593 |
+
|
| 594 |
+
\paragraph{La loss n'est pas un bon indicateur de qualit\'e SFT.} Le r\'esultat le plus frappant est la d\'econnexion entre la loss et les performances aux benchmarks. La loss baisse significativement de 1,86 \`a 1,69 ($-$9\,\%), mais les benchmarks stagnent ou se d\'egradent. Ce ph\'enom\`ene r\'ev\`ele que le mod\`ele apprend \`a mieux reproduire le \emph{format} des r\'eponses du dataset SFT (baisse de la loss sur les tokens de r\'eponse) sans am\'eliorer ses \emph{connaissances} ou ses capacit\'es de \emph{raisonnement} sous-jacentes. En d'autres termes, le mod\`ele devient plus fluide dans le format ChatML sans devenir plus intelligent.
|
| 595 |
+
|
| 596 |
+
\paragraph{Signal d'overfitting : WinoGrande.} La d\'egradation de WinoGrande de 53,8\,\% \`a 52,8\,\% ($-$1,0 point) est le signal le plus clair d'overfitting. WinoGrande teste le raisonnement par sens commun sur la r\'esolution de pronoms ambigus, une capacit\'e qui ne devrait pas se d\'egrader avec un entra\^inement suppl\'ementaire si le mod\`ele g\'en\'eralisait correctement. Avec 2,47M d'exemples et 2,2 \'epoques, chaque exemple du dataset SFT a \'et\'e vu en moyenne plus de 2 fois. Le mod\`ele commence \`a m\'emoriser les patterns sp\'ecifiques du dataset plut\^ot qu'\`a g\'en\'eraliser, ce qui nuit \`a sa capacit\'e de raisonnement g\'en\'eral.
|
| 597 |
+
|
| 598 |
+
\paragraph{ARC-Challenge confirme la tendance.} La baisse d'ARC-Challenge ($-$0,4 point) va dans le m\^eme sens. Ce benchmark teste le raisonnement scientifique sur des questions difficiles, et sa d\'egradation parall\`ele \`a celle de WinoGrande renforce l'hypoth\`ese d'un overfitting qui impacte sp\'ecifiquement les capacit\'es de raisonnement.
|
| 599 |
+
|
| 600 |
+
\paragraph{Implication pratique.} Pour un dataset de 2,47M d'exemples avec un batch de 32, une \'epoque correspond \`a 45\,383 pas. Le SFT-30K (0,66 \'epoque) n'a pas encore fait un passage complet du dataset, mais atteint d\'ej\`a des performances optimales. Le compute suppl\'ementaire du SFT-100K (3,3$\times$ plus) est donc largement gaspill\'e.
|
| 601 |
+
|
| 602 |
+
\subsection{Importance du Checkpoint de Base}
|
| 603 |
+
|
| 604 |
+
La comparaison entre les diff\'erentes variantes fine-tun\'ees r\'ev\`ele un paradoxe apparent :
|
| 605 |
+
|
| 606 |
+
\begin{itemize}[leftmargin=*]
|
| 607 |
+
\item \textbf{Instruct v0.1} (base 10B tokens, 5\,500 pas SFT, 185K exemples) : HellaSwag = 42,7\,\%
|
| 608 |
+
\item \textbf{SFT-30K} (base 39B tokens, 30\,000 pas SFT, 2,47M exemples) : HellaSwag = 41,7\,\%
|
| 609 |
+
\end{itemize}
|
| 610 |
+
|
| 611 |
+
Le mod\`ele fine-tun\'e \`a partir d'une base plus faible (10B tokens) obtient un HellaSwag post-SFT sup\'erieur (+1,0 point) \`a celui fine-tun\'e \`a partir de la base plus forte (39B tokens). Plusieurs facteurs peuvent expliquer ce r\'esultat :
|
| 612 |
+
|
| 613 |
+
\begin{enumerate}[leftmargin=*]
|
| 614 |
+
\item \textbf{Datasets SFT diff\'erents} : Instruct v0.1 utilise 185K exemples (probablement de meilleure qualit\'e unitaire), tandis que SFT-30K utilise 2,47M exemples (plus de diversit\'e mais potentiellement plus de bruit). La qualit\'e des exemples SFT a un impact direct sur la d\'egradation des benchmarks.
|
| 615 |
+
\item \textbf{Nombre de pas SFT diff\'erent} : 5\,500 pas repr\'esentent une exposition beaucoup plus l\'eg\`ere au SFT que 30\,000 pas, ce qui pr\'eserve davantage les capacit\'es du mod\`ele de base. Avec moins de pas, le mod\`ele \og oublie \fg{} moins ses capacit\'es de compl\'etion de texte.
|
| 616 |
+
\item \textbf{Surface de loss diff\'erente} : Le mod\`ele \`a 10B tokens se trouve dans un r\'egime d'entra\^inement diff\'erent (loss 3,20 vs 2,33), ce qui peut influencer la mani\`ere dont le SFT modifie les poids --- un mod\`ele avec une loss plus \'elev\'ee pourrait \^etre plus \og malleable \fg{} au SFT.
|
| 617 |
+
\end{enumerate}
|
| 618 |
+
|
| 619 |
+
Ce r\'esultat souligne que la qualit\'e post-SFT n'est pas une simple fonction du checkpoint de base : la combinaison checkpoint de base, dataset SFT et dur\'ee de SFT forme un espace d'hyperparam\`etres \`a trois dimensions qu'il convient d'optimiser conjointement.
|
| 620 |
+
|
| 621 |
+
\subsection{Recommandations Pratiques}
|
| 622 |
+
|
| 623 |
+
\`A partir de l'ensemble de nos observations, nous formulons les recommandations suivantes pour le fine-tuning de petits mod\`eles de langage (moins d'1B de param\`etres) :
|
| 624 |
+
|
| 625 |
+
\begin{enumerate}[leftmargin=*]
|
| 626 |
+
\item \textbf{Limiter le SFT \`a moins d'1 \'epoque} : Pour un dataset de l'ordre du million d'exemples, 0,5--0,7 \'epoque semble optimal. Au-del\`a, le risque d'overfitting augmente sans b\'en\'efice mesurable sur les benchmarks.
|
| 627 |
+
\item \textbf{Surveiller WinoGrande et ARC-Challenge} : Ces deux benchmarks sont les premiers \`a montrer des signes d'overfitting lors du SFT. Une d\'egradation de ces m\'etriques est un signal d'arr\^et plus fiable que la loss d'entra\^inement.
|
| 628 |
+
\item \textbf{Ne pas se fier \`a la loss pour le SFT} : Contrairement au pr\'e-entra\^inement o\`u la loss est un indicateur fiable de la qualit\'e du mod\`ele, la loss SFT mesure principalement la conformit\'e au format, pas la qualit\'e du raisonnement.
|
| 629 |
+
\item \textbf{Privil\'egier la diversit\'e plut\^ot que le volume} : Un dataset SFT de haute qualit\'e avec des exemples diversifi\'es est pr\'ef\'erable \`a un large dataset bruit\'e entra\^in\'e sur plusieurs \'epoques.
|
| 630 |
+
\item \textbf{Investir dans le pr\'e-entra\^inement} : La progression de 45,8\,\% \`a 53,5\,\% sur HellaSwag montre que le pr\'e-entra\^inement suppl\'ementaire apporte des gains bien plus importants que l'augmentation du SFT.
|
| 631 |
+
\end{enumerate}
|
| 632 |
+
|
| 633 |
+
% ============================================================================
|
| 634 |
+
% 10. Analyse
|
| 635 |
+
% ============================================================================
|
| 636 |
+
\section{Analyse}
|
| 637 |
+
|
| 638 |
+
\subsection{Efficacit\'e d'Entra\^inement}
|
| 639 |
+
|
| 640 |
+
La performance \'elev\'ee de Julian-600M sur HellaSwag malgr\'e un volume limit\'e de donn\'ees d'entra\^inement sugg\`ere que notre architecture et notre proc\'edure d'entra\^inement sont hautement efficaces. Nous \'emettons l'hypoth\`ese de plusieurs facteurs contributifs :
|
| 641 |
+
|
| 642 |
+
\begin{enumerate}[leftmargin=*]
|
| 643 |
+
\item \textbf{Architecture moderne} : La combinaison de RoPE, SwiGLU et RMSNorm (comme dans LLaMA) fournit de meilleurs biais inductifs que les architectures utilis\'ees dans GPT-2 et OPT (embeddings positionnels appris, FFN standard, LayerNorm). Les biais inductifs sont les hypoth\`eses implicites de l'architecture sur la structure des donn\'ees ; de meilleurs biais inductifs permettent au mod\`ele d'apprendre plus efficacement \`a partir de moins de donn\'ees.
|
| 644 |
+
\item \textbf{Qualit\'e des donn\'ees} : FineWeb-Edu et Wikip\'edia fournissent des donn\'ees d'entra\^inement de haute qualit\'e et factuelles, offrant potentiellement plus d'\og apprentissage par token \fg{} que des crawls web plus bruit\'es comme ceux utilis\'es pour entra\^iner OPT.
|
| 645 |
+
\item \textbf{Entra\^inement bilingue} : L'exposition au fran\c{c}ais et \`a l'anglais peut fournir des b\'en\'efices de transfert cross-lingue, particuli\`erement pour les t\^aches de raisonnement par sens commun o\`u la structure logique transcende les fronti\`eres linguistiques.
|
| 646 |
+
\end{enumerate}
|
| 647 |
+
|
| 648 |
+
\begin{figure}[t]
|
| 649 |
+
\centering
|
| 650 |
+
\begin{tikzpicture}
|
| 651 |
+
\begin{axis}[
|
| 652 |
+
width=0.92\textwidth,
|
| 653 |
+
height=7cm,
|
| 654 |
+
xlabel={Tokens d'entra\^inement},
|
| 655 |
+
ylabel={HellaSwag (acc\_norm, \%)},
|
| 656 |
+
xmode=log,
|
| 657 |
+
xmin=2e10, xmax=5e11,
|
| 658 |
+
ymin=25, ymax=58,
|
| 659 |
+
grid=both,
|
| 660 |
+
grid style={gray!15},
|
| 661 |
+
legend style={at={(0.97,0.97)}, anchor=north east, font=\small},
|
| 662 |
+
xtick={5e10, 1e11, 3e11},
|
| 663 |
+
xticklabels={50B, 100B, 300B},
|
| 664 |
+
]
|
| 665 |
+
\addplot[only marks, mark=*, mark size=2.5pt, gray!60] coordinates {
|
| 666 |
+
(3e11, 29.2)
|
| 667 |
+
(1e11, 31.5)
|
| 668 |
+
(3e11, 32.0)
|
| 669 |
+
(3e11, 33.3)
|
| 670 |
+
(3e11, 37.6)
|
| 671 |
+
(3e11, 41.5)
|
| 672 |
+
(1e11, 50.9)
|
| 673 |
+
};
|
| 674 |
+
\addplot[only marks, mark=*, mark size=3.5pt, black, fill=black!70] coordinates {
|
| 675 |
+
(3.9e10, 53.5)
|
| 676 |
+
};
|
| 677 |
+
\node[font=\tiny, anchor=south west] at (axis cs:3.15e11, 29.2) {OPT-125M};
|
| 678 |
+
\node[font=\tiny, anchor=south east] at (axis cs:9.5e10, 31.5) {GPT-2 Small};
|
| 679 |
+
\node[font=\tiny, anchor=south west] at (axis cs:3.15e11, 32.0) {OPT-350M};
|
| 680 |
+
\node[font=\tiny, anchor=south west] at (axis cs:3.15e11, 33.3) {Pythia-410M};
|
| 681 |
+
\node[font=\tiny, anchor=south west] at (axis cs:3.15e11, 37.6) {Pythia-1B};
|
| 682 |
+
\node[font=\tiny, anchor=south west] at (axis cs:3.15e11, 41.5) {OPT-1.3B};
|
| 683 |
+
\node[font=\tiny, anchor=south east] at (axis cs:9.5e10, 50.9) {GPT-2 XL};
|
| 684 |
+
\node[font=\scriptsize, anchor=south west] at (axis cs:4.2e10, 53.5) {\textbf{Julian-600M}};
|
| 685 |
+
\legend{Autres mod\`eles, Julian (le n\^otre)}
|
| 686 |
+
\end{axis}
|
| 687 |
+
\end{tikzpicture}
|
| 688 |
+
\caption{Efficacit\'e en tokens : pr\'ecision HellaSwag en fonction du volume de donn\'ees d'entra\^inement. Julian-600M (en bas \`a gauche, 39B tokens) atteint le score HellaSwag le plus \'elev\'e avec 7,7$\times$ moins de donn\'ees que les mod\`eles OPT et Pythia (300B tokens). Le losange met en \'evidence la position de Julian dans la r\'egion haute pr\'ecision / peu de donn\'ees.}
|
| 689 |
+
\label{fig:token_efficiency}
|
| 690 |
+
\end{figure}
|
| 691 |
+
|
| 692 |
+
\subsection{L'Anomalie HellaSwag}
|
| 693 |
+
|
| 694 |
+
Le score HellaSwag de 53,5\,\% pour Julian-600M est remarquablement \'elev\'e --- sup\'erieur m\^eme \`a GPT-2~XL (50,9\,\%) qui poss\`ede 2,5$\times$ plus de param\`etres. Plusieurs hypoth\`eses m\'eritent investigation :
|
| 695 |
+
|
| 696 |
+
\begin{itemize}[leftmargin=*]
|
| 697 |
+
\item \textbf{Hypoth\`ese architecturale} : Les composants modernes (RoPE, SwiGLU, RMSNorm) peuvent \^etre particuli\`erement avantageux pour les t\^aches de compl\'etion de texte mesur\'ees par HellaSwag. La normalisation par la longueur (acc\_norm) pourrait favoriser notre architecture.
|
| 698 |
+
\item \textbf{Hypoth\`ese de sur-sp\'ecialisation} : Il est possible que le mod\`ele ait d\'evelopp\'e une sp\'ecialisation particuli\`ere pour ce type de t\^ache, au d\'etriment d'autres capacit\'es --- ce que sugg\`erent les scores plus modestes sur LAMBADA.
|
| 699 |
+
\item \textbf{Hypoth\`ese de contamination} : Bien que nous ayons appliqu\'e une d\'eduplication rigoureuse \citep{lee2022deduplicating}, nous ne pouvons pas exclure compl\`etement une contamination partielle avec des donn\'ees proches du benchmark, en particulier via FineWeb-Edu qui contient du contenu \'educatif potentiellement li\'e aux sc\'enarios de sens commun test\'es par HellaSwag.
|
| 700 |
+
\end{itemize}
|
| 701 |
+
|
| 702 |
+
\subsection{Saturation du SFT}
|
| 703 |
+
|
| 704 |
+
Comme discut\'e en d\'etail dans la section~\ref{tab:sft_delta}, la comparaison SFT-30K vs SFT-100K r\'ev\`ele une saturation claire : l'entra\^inement suppl\'ementaire au-del\`a de 30K pas n'apporte qu'une am\'elioration n\'egligeable et commence \`a d\'egrader certains benchmarks. Pour un dataset de 2,47M d'exemples, une seule \'epoque ($\sim$45K pas) est suffisante, et les \'epoques multiples m\`enent \`a l'overfitting. Ce r\'esultat est coh\'erent avec les observations de la litt\'erature sur les mod\`eles de petite taille, dont la capacit\'e d'absorption est limit\'ee.
|
| 705 |
+
|
| 706 |
+
% ============================================================================
|
| 707 |
+
% 11. Limites
|
| 708 |
+
% ============================================================================
|
| 709 |
+
\section{Limites}
|
| 710 |
+
|
| 711 |
+
\begin{itemize}[leftmargin=*]
|
| 712 |
+
\item \textbf{Taille du mod\`ele} : \`A 600M de param\`etres, Julian a des capacit\'es de raisonnement et une pr\'ecision factuelle limit\'ees par rapport aux mod\`eles plus grands. Les t\^aches n\'ecessitant une cha\^ine de raisonnement longue ou des connaissances factuelles pr\'ecises restent hors de port\'ee.
|
| 713 |
+
\item \textbf{Volume de donn\'ees d'entra\^inement} : Bien qu'efficace, 39B tokens est en dessous du ratio optimal de Chinchilla pour un mod\`ele qui atteint ce niveau de performance sur HellaSwag, sugg\'erant que le mod\`ele pourrait b\'en\'eficier d'un entra\^inement continu sur davantage de donn\'ees. LAMBADA en particulier b\'en\'eficierait d'un corpus plus large et plus diversifi\'e.
|
| 714 |
+
\item \textbf{\'Evaluation anglo-centr\'ee} : Tous les benchmarks sont en anglais. Nous manquons de benchmarks d'\'evaluation standardis\'es en fran\c{c}ais pour les mod\`eles de langage de cette taille. Des efforts comme le French Bench ou FrenchBench pourraient combler cette lacune.
|
| 715 |
+
\item \textbf{Hallucination} : Comme tous les mod\`eles de langage, Julian g\'en\`ere fr\'equemment des informations incorrectes ou fabriqu\'ees, particuli\`erement pour les requ\^etes factuelles. Ce probl\`eme est exacerb\'e par la petite taille du mod\`ele.
|
| 716 |
+
\item \textbf{Suivi d'instructions basique} : Le SFT sans apprentissage par renforcement \`a partir de feedback humain (RLHF) \citep{christiano2017deep, ouyang2022training} ou optimisation directe des pr\'ef\'erences (DPO) \citep{rafailov2023direct} produit des capacit\'es de suivi d'instructions significativement plus faibles que les mod\`eles entra\^in\'es avec RLHF. Le mod\`ele peut mal interpr\'eter des instructions complexes ou multi-\'etapes.
|
| 717 |
+
\item \textbf{Sous-performance LAMBADA} : La pr\'ecision relativement basse sur LAMBADA (37,3\,\% vs.\ 50,5\,\% pour Pythia-410M) indique que les capacit\'es de pr\'ediction de texte g\'en\'eral sont en retrait par rapport \`a la performance forte en raisonnement par sens commun.
|
| 718 |
+
\item \textbf{Reproductibilit\'e} : L'utilisation de TPU pr\'eemptibles implique que l'entra\^inement a \'et\'e interrompu et repris plusieurs fois. Bien que nous sauvegardions l'\'etat complet de l'optimiseur, ces interruptions introduisent une variabilit\'e non contr\^ol\'ee.
|
| 719 |
+
\end{itemize}
|
| 720 |
+
|
| 721 |
+
% ============================================================================
|
| 722 |
+
% 12. Conclusion
|
| 723 |
+
% ============================================================================
|
| 724 |
+
\section{Conclusion}
|
| 725 |
+
|
| 726 |
+
Nous avons pr\'esent\'e Julian, une famille de mod\`eles de langage bilingues entra\^in\'es \`a partir de z\'ero sur infrastructure TPU en utilisant JAX/Flax. Notre mod\`ele phare, Julian-600M, atteint une efficacit\'e remarquable sur HellaSwag (53,5\,\%), surpassant des mod\`eles poss\'edant 2$\times$ plus de param\`etres et entra\^in\'es sur 8$\times$ plus de donn\'ees. Nous avons document\'e l'int\'egralit\'e du pipeline d'entra\^inement, de la collecte de donn\'ees et l'entra\^inement du tokenizer au pr\'e-entra\^inement, au fine-tuning supervis\'e et \`a l'\'evaluation.
|
| 727 |
+
|
| 728 |
+
Notre analyse d\'etaill\'ee du SFT r\'ev\`ele des enseignements pratiques importants : (1) le SFT d\'egrade in\'evitablement les benchmarks de compl\'etion de texte comme HellaSwag, mais pr\'eserve les capacit\'es de raisonnement ; (2) au-del\`a d'une \'epoque, le SFT suppl\'ementaire apporte des rendements d\'ecroissants voire n\'egatifs ; (3) la loss d'entra\^inement n'est pas un indicateur fiable de la qualit\'e d'un mod\`ele fine-tun\'e.
|
| 729 |
+
|
| 730 |
+
\paragraph{Travaux futurs.} Nous pr\'evoyons de : (1) \'etendre Julian \`a 2B de param\`etres en utilisant des configurations TPU plus larges (v6e-64) ; (2) impl\'ementer le DPO pour un meilleur suivi d'instructions ; (3) d\'evelopper des benchmarks d'\'evaluation en fran\c{c}ais ; et (4) explorer l'entra\^inement continu sur des datasets plus larges pour am\'eliorer LAMBADA et la pr\'ediction de texte g\'en\'eral.
|
| 731 |
+
|
| 732 |
+
\paragraph{Publication ouverte.} Tous les poids des mod\`eles sont disponibles \`a l'adresse \url{https://huggingface.co/JulianKrgd} sous licence Apache 2.0.
|
| 733 |
+
|
| 734 |
+
% ============================================================================
|
| 735 |
+
% Remerciements
|
| 736 |
+
% ============================================================================
|
| 737 |
+
\section*{Remerciements}
|
| 738 |
+
|
| 739 |
+
Ce travail a \'et\'e rendu possible gr\^ace au programme \emph{TPU Research Cloud} (TRC) de Google, qui a fourni un acc\`es gratuit \`a des pods TPU v4-32. Nous remercions l'\'equipe TRC pour son soutien.
|
| 740 |
+
|
| 741 |
+
% ============================================================================
|
| 742 |
+
% R\'ef\'erences
|
| 743 |
+
% ============================================================================
|
| 744 |
+
\bibliographystyle{plainnat}
|
| 745 |
+
|
| 746 |
+
\begin{thebibliography}{36}
|
| 747 |
+
|
| 748 |
+
\bibitem[Biderman et~al.(2023)]{biderman2023pythia}
|
| 749 |
+
Stella Biderman, Hailey Schoelkopf, Quentin Anthony, Herbie Bradley, Kyle O'Brien, Eric Hallahan, Mohammad Aflah Khan, Shivanshu Purohit, USVSN Sai Prashanth, Edward Raff, Aviya Skowron, Lintang Sutawika, et Oskar van~der Wal.
|
| 750 |
+
\newblock Pythia: A suite for analyzing large language models across training and scaling.
|
| 751 |
+
\newblock In \emph{ICML}, 2023.
|
| 752 |
+
\newblock \url{https://arxiv.org/abs/2304.01373}
|
| 753 |
+
|
| 754 |
+
\bibitem[Bradbury et~al.(2018)]{bradbury2018jax}
|
| 755 |
+
James Bradbury, Roy Frostig, Peter Hawkins, Matthew~James Johnson, Chris Leary, Dougal Maclaurin, George Necula, Adam Paszke, Jake Vander{P}las, Skye Wanderman-{M}ilne, et Qiao Zhang.
|
| 756 |
+
\newblock {JAX}: Composable transformations of {Python}+{NumPy} programs.
|
| 757 |
+
\newblock 2018.
|
| 758 |
+
\newblock \url{https://github.com/jax-ml/jax}
|
| 759 |
+
|
| 760 |
+
\bibitem[Bisk et~al.(2020)]{bisk2020piqa}
|
| 761 |
+
Yonatan Bisk, Rowan Zellers, Ronan Le~Bras, Jianfeng Gao, et Yejin Choi.
|
| 762 |
+
\newblock {PIQA}: Reasoning about physical intuition in natural language.
|
| 763 |
+
\newblock In \emph{AAAI}, 2020.
|
| 764 |
+
\newblock \url{https://arxiv.org/abs/1911.11641}
|
| 765 |
+
|
| 766 |
+
\bibitem[Brown et~al.(2020)]{brown2020language}
|
| 767 |
+
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared~D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et~al.
|
| 768 |
+
\newblock Language models are few-shot learners.
|
| 769 |
+
\newblock In \emph{NeurIPS}, 2020.
|
| 770 |
+
\newblock \url{https://arxiv.org/abs/2005.14165}
|
| 771 |
+
|
| 772 |
+
\bibitem[Chowdhery et~al.(2023)]{chowdhery2023palm}
|
| 773 |
+
Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, Paul Barham, Hyung~Won Chung, Charles Sutton, Sebastian Gehrmann, et~al.
|
| 774 |
+
\newblock {PaLM}: Scaling language modeling with {P}athways.
|
| 775 |
+
\newblock \emph{JMLR}, 2023.
|
| 776 |
+
\newblock \url{https://arxiv.org/abs/2204.02311}
|
| 777 |
+
|
| 778 |
+
\bibitem[Clark et~al.(2018)]{clark2018think}
|
| 779 |
+
Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, et Oyvind Tafjord.
|
| 780 |
+
\newblock Think you have solved question answering? {T}ry {ARC}, the {AI2} reasoning challenge.
|
| 781 |
+
\newblock \emph{arXiv preprint arXiv:1803.05457}, 2018.
|
| 782 |
+
\newblock \url{https://arxiv.org/abs/1803.05457}
|
| 783 |
+
|
| 784 |
+
\bibitem[Clark et~al.(2019)]{clark2019boolq}
|
| 785 |
+
Christopher Clark, Kenton Lee, Ming-Wei Chang, Tom Kwiatkowski, Michael Collins, et Kristina Toutanova.
|
| 786 |
+
\newblock {BoolQ}: Exploring the surprising difficulty of natural yes/no questions.
|
| 787 |
+
\newblock In \emph{NAACL}, 2019.
|
| 788 |
+
\newblock \url{https://arxiv.org/abs/1905.10044}
|
| 789 |
+
|
| 790 |
+
\bibitem[Christiano et~al.(2017)]{christiano2017deep}
|
| 791 |
+
Paul~F. Christiano, Jan Leike, Tom Brown, Miljan Martic, Shane Legg, et Dario Amodei.
|
| 792 |
+
\newblock Deep reinforcement learning from human preferences.
|
| 793 |
+
\newblock In \emph{NeurIPS}, 2017.
|
| 794 |
+
\newblock \url{https://arxiv.org/abs/1706.03741}
|
| 795 |
+
|
| 796 |
+
\bibitem[Conneau et~al.(2020)]{conneau2020xlmr}
|
| 797 |
+
Alexis Conneau, Kartikay Khandelwal, Naman Goyal, Vishrav Chaudhary, Guillaume Wenzek, Francisco Guzm{\'a}n, Edouard Grave, Myle Ott, Luke Zettlemoyer, et Veselin Stoyanov.
|
| 798 |
+
\newblock Unsupervised cross-lingual representation learning at scale.
|
| 799 |
+
\newblock In \emph{ACL}, 2020.
|
| 800 |
+
\newblock \url{https://arxiv.org/abs/1911.02116}
|
| 801 |
+
|
| 802 |
+
\bibitem[Devlin et~al.(2019)]{devlin2019bert}
|
| 803 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, et Kristina Toutanova.
|
| 804 |
+
\newblock {BERT}: Pre-training of deep bidirectional transformers for language understanding.
|
| 805 |
+
\newblock In \emph{NAACL}, 2019.
|
| 806 |
+
\newblock \url{https://arxiv.org/abs/1810.04805}
|
| 807 |
+
|
| 808 |
+
\bibitem[Gao et~al.(2023)]{gao2023framework}
|
| 809 |
+
Leo Gao, Jonathan Tow, Baber Abbasi, Stella Biderman, Sid Black, Anthony DiPofi, Charles Foster, Laurence Golding, Jeffrey Hsu, Alain Le~Noac'h, Haonan Li, Kyle McDonell, Niklas Muennighoff, Chris Ociepa, Jason Phang, Laria Reynolds, Hailey Schoelkopf, Aviya Skowron, Lintang Sutawika, Eric Tang, Anish Thite, Ben Wang, Kevin Wang, et Andy Zou.
|
| 810 |
+
\newblock A framework for few-shot language model evaluation.
|
| 811 |
+
\newblock \emph{Zenodo}, 2023.
|
| 812 |
+
\newblock \url{https://zenodo.org/records/10256836}
|
| 813 |
+
|
| 814 |
+
\bibitem[Hoffmann et~al.(2022)]{hoffmann2022training}
|
| 815 |
+
Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya, Trevor Cai, Eliza Rutherford, Diego de~Las~Casas, Lisa~Anne Hendricks, Johannes Welbl, Aidan Clark, Tom Hennigan, Eric Noland, Katie Millican, George van~den Driessche, Bogdan Damoc, Aurelia Guy, Simon Osindero, Karen Simonyan, Erich Elsen, Jack~W. Rae, Oriol Vinyals, et Laurent Sifre.
|
| 816 |
+
\newblock Training compute-optimal large language models.
|
| 817 |
+
\newblock In \emph{NeurIPS}, 2022.
|
| 818 |
+
\newblock \url{https://arxiv.org/abs/2203.15556}
|
| 819 |
+
|
| 820 |
+
\bibitem[Kaplan et~al.(2020)]{kaplan2020scaling}
|
| 821 |
+
Jared Kaplan, Sam McCandlish, Tom Henighan, Tom~B Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, et Ilya Sutskever.
|
| 822 |
+
\newblock Scaling laws for neural language models.
|
| 823 |
+
\newblock \emph{arXiv preprint arXiv:2001.08361}, 2020.
|
| 824 |
+
\newblock \url{https://arxiv.org/abs/2001.08361}
|
| 825 |
+
|
| 826 |
+
\bibitem[Lee et~al.(2022)]{lee2022deduplicating}
|
| 827 |
+
Katherine Lee, Daphne Ippolito, Andrew Nystrom, Chiyuan Zhang, Douglas Eck, Chris Callison-Burch, et Nicholas Carlini.
|
| 828 |
+
\newblock Deduplicating training data makes language models better.
|
| 829 |
+
\newblock In \emph{ACL}, 2022.
|
| 830 |
+
\newblock \url{https://arxiv.org/abs/2107.06499}
|
| 831 |
+
|
| 832 |
+
\bibitem[Kudo et Richardson(2018)]{kudo2018sentencepiece}
|
| 833 |
+
Taku Kudo et John Richardson.
|
| 834 |
+
\newblock {SentencePiece}: A simple and language independent subword tokenizer and detokenizer for neural text processing.
|
| 835 |
+
\newblock In \emph{EMNLP (demo)}, 2018.
|
| 836 |
+
\newblock \url{https://arxiv.org/abs/1808.06226}
|
| 837 |
+
|
| 838 |
+
\bibitem[Liu et~al.(2024)]{liu2024mobilellm}
|
| 839 |
+
Zechun Liu, Changlin Li, Barlas O\u{g}uz, et~al.
|
| 840 |
+
\newblock {MobileLLM}: Optimizing sub-billion parameter language models for on-device use cases.
|
| 841 |
+
\newblock In \emph{ICML}, 2024.
|
| 842 |
+
\newblock \url{https://arxiv.org/abs/2402.14905}
|
| 843 |
+
|
| 844 |
+
\bibitem[Micikevicius et~al.(2018)]{micikevicius2018mixed}
|
| 845 |
+
Paulius Micikevicius, Sharan Narang, Jonah Alben, Gregory Diamos, Erich Elsen, David Garcia, Boris Ginsburg, Michael Houston, Oleksii Kuchaiev, Ganesh Venkatesh, et Hao Wu.
|
| 846 |
+
\newblock Mixed precision training.
|
| 847 |
+
\newblock In \emph{ICLR}, 2018.
|
| 848 |
+
\newblock \url{https://arxiv.org/abs/1710.03740}
|
| 849 |
+
|
| 850 |
+
\bibitem[Loshchilov et Hutter(2019)]{loshchilov2019decoupled}
|
| 851 |
+
Ilya Loshchilov et Frank Hutter.
|
| 852 |
+
\newblock Decoupled weight decay regularization.
|
| 853 |
+
\newblock In \emph{ICLR}, 2019.
|
| 854 |
+
\newblock \url{https://arxiv.org/abs/1711.05101}
|
| 855 |
+
|
| 856 |
+
\bibitem[OpenAI(2023)]{openai2023chatml}
|
| 857 |
+
OpenAI.
|
| 858 |
+
\newblock {ChatML}: Chat markup language.
|
| 859 |
+
\newblock Documentation technique, 2023.
|
| 860 |
+
\newblock \url{https://github.com/openai/openai-python/blob/v0.28.1/chatml.md}
|
| 861 |
+
|
| 862 |
+
\bibitem[Ouyang et~al.(2022)]{ouyang2022training}
|
| 863 |
+
Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et~al.
|
| 864 |
+
\newblock Training language models to follow instructions with human feedback.
|
| 865 |
+
\newblock In \emph{NeurIPS}, 2022.
|
| 866 |
+
\newblock \url{https://arxiv.org/abs/2203.02155}
|
| 867 |
+
|
| 868 |
+
\bibitem[Paperno et~al.(2016)]{paperno2016lambada}
|
| 869 |
+
Denis Paperno, Germ{\'a}n Kruszewski, Angeliki Lazaridou, Quan~Ngoc Pham, Raffaella Bernardi, Sandro Pezzelle, Marco Baroni, Gemma Boleda, et Raquel Fern{\'a}ndez.
|
| 870 |
+
\newblock The {LAMBADA} dataset: Word prediction requiring a broad discourse context.
|
| 871 |
+
\newblock In \emph{ACL}, 2016.
|
| 872 |
+
\newblock \url{https://arxiv.org/abs/1606.06031}
|
| 873 |
+
|
| 874 |
+
\bibitem[Rafailov et~al.(2023)]{rafailov2023direct}
|
| 875 |
+
Rafael Rafailov, Archit Sharma, Eric Mitchell, Stefano Ermon, Christopher~D. Manning, et Chelsea Finn.
|
| 876 |
+
\newblock Direct preference optimization: Your language model is secretly a reward model.
|
| 877 |
+
\newblock In \emph{NeurIPS}, 2023.
|
| 878 |
+
\newblock \url{https://arxiv.org/abs/2305.18290}
|
| 879 |
+
|
| 880 |
+
\bibitem[Radford et~al.(2019)]{radford2019language}
|
| 881 |
+
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, et Ilya Sutskever.
|
| 882 |
+
\newblock Language models are unsupervised multitask learners.
|
| 883 |
+
\newblock \emph{OpenAI blog}, 2019.
|
| 884 |
+
\newblock \url{https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf}
|
| 885 |
+
|
| 886 |
+
\bibitem[Sakaguchi et~al.(2020)]{sakaguchi2020winogrande}
|
| 887 |
+
Keisuke Sakaguchi, Ronan Le~Bras, Chandra Bhagavatula, et Yejin Choi.
|
| 888 |
+
\newblock {WinoGrande}: An adversarial winograd schema challenge at scale.
|
| 889 |
+
\newblock In \emph{AAAI}, 2020.
|
| 890 |
+
\newblock \url{https://arxiv.org/abs/1907.10641}
|
| 891 |
+
|
| 892 |
+
\bibitem[Shazeer(2020)]{shazeer2020glu}
|
| 893 |
+
Noam Shazeer.
|
| 894 |
+
\newblock {GLU} variants improve transformer.
|
| 895 |
+
\newblock \emph{arXiv preprint arXiv:2002.05202}, 2020.
|
| 896 |
+
\newblock \url{https://arxiv.org/abs/2002.05202}
|
| 897 |
+
|
| 898 |
+
\bibitem[Su et~al.(2021)]{su2021roformer}
|
| 899 |
+
Jianlin Su, Yu Lu, Shengfeng Pan, Ahmed Murtadha, Bo Wen, et Yunfeng Liu.
|
| 900 |
+
\newblock {RoFormer}: Enhanced transformer with rotary position embedding.
|
| 901 |
+
\newblock \emph{arXiv preprint arXiv:2104.09864}, 2021.
|
| 902 |
+
\newblock \url{https://arxiv.org/abs/2104.09864}
|
| 903 |
+
|
| 904 |
+
\bibitem[Touvron et~al.(2023)]{touvron2023llama}
|
| 905 |
+
Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timoth{\'e}e Lacroix, Baptiste Rozi{\`e}re, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, et Guillaume Lample.
|
| 906 |
+
\newblock {LLaMA}: Open and efficient foundation language models.
|
| 907 |
+
\newblock \emph{arXiv preprint arXiv:2302.13971}, 2023.
|
| 908 |
+
\newblock \url{https://arxiv.org/abs/2302.13971}
|
| 909 |
+
|
| 910 |
+
\bibitem[Vaswani et~al.(2017)]{vaswani2017attention}
|
| 911 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan~N Gomez, {\L}ukasz Kaiser, et Illia Polosukhin.
|
| 912 |
+
\newblock Attention is all you need.
|
| 913 |
+
\newblock In \emph{NeurIPS}, 2017.
|
| 914 |
+
\newblock \url{https://arxiv.org/abs/1706.03762}
|
| 915 |
+
|
| 916 |
+
\bibitem[Workshop et~al.(2023)]{workshop2023bloom}
|
| 917 |
+
BigScience Workshop, Teven Le~Scao, Angela Fan, et~al.
|
| 918 |
+
\newblock {BLOOM}: A 176B-parameter open-access multilingual language model.
|
| 919 |
+
\newblock \emph{arXiv preprint arXiv:2211.05100}, 2023.
|
| 920 |
+
\newblock \url{https://arxiv.org/abs/2211.05100}
|
| 921 |
+
|
| 922 |
+
\bibitem[Zellers et~al.(2019)]{zellers2019hellaswag}
|
| 923 |
+
Rowan Zellers, Ari Holtzman, Yonatan Bisk, Ali Farhadi, et Yejin Choi.
|
| 924 |
+
\newblock {HellaSwag}: Can a machine really finish your sentence?
|
| 925 |
+
\newblock In \emph{ACL}, 2019.
|
| 926 |
+
\newblock \url{https://arxiv.org/abs/1905.07830}
|
| 927 |
+
|
| 928 |
+
\bibitem[Zhang et~al.(2022)]{zhang2022opt}
|
| 929 |
+
Susan Zhang, Stephen Roller, Naman Goyal, Mikel Artetxe, Moya Chen, Shuohui Chen, Christopher Dewan, Mona Diab, Xian Li, Xi~Victoria Lin, Todor Mihaylov, Myle Ott, Sam Shleifer, Kurt Shuster, Daniel Simig, Punit~Singh Koura, Anjali Sridhar, Tianlu Wang, et Luke Zettlemoyer.
|
| 930 |
+
\newblock {OPT}: Open pre-trained transformer language models.
|
| 931 |
+
\newblock \emph{arXiv preprint arXiv:2205.01068}, 2022.
|
| 932 |
+
\newblock \url{https://arxiv.org/abs/2205.01068}
|
| 933 |
+
|
| 934 |
+
\bibitem[Zhang et Sennrich(2019)]{zhang2019root}
|
| 935 |
+
Biao Zhang et Rico Sennrich.
|
| 936 |
+
\newblock Root mean square layer normalization.
|
| 937 |
+
\newblock In \emph{NeurIPS}, 2019.
|
| 938 |
+
\newblock \url{https://arxiv.org/abs/1910.07467}
|
| 939 |
+
|
| 940 |
+
\bibitem[Xu et~al.(2021)]{xu2021gspmd}
|
| 941 |
+
Yuanzhong Xu, HyoukJoong Lee, Dehao Chen, Blake Hechtman, Yanping Huang, Rahul Joshi, Maxim Krikun, Dmitry Lepikhin, Andy Ly, Marcello Maggioni, Ruoming Pang, Noam Shazeer, Shibo Wang, Tao Wang, Yonghui Wu, et Zhifeng Chen.
|
| 942 |
+
\newblock {GSPMD}: General and scalable parallelization for {ML} computation graphs.
|
| 943 |
+
\newblock \emph{arXiv preprint arXiv:2105.04663}, 2021.
|
| 944 |
+
\newblock \url{https://arxiv.org/abs/2105.04663}
|
| 945 |
+
|
| 946 |
+
\bibitem[Zhang et~al.(2024)]{zhang2024tinyllama}
|
| 947 |
+
Peiyuan Zhang, Guangtao Zeng, Tianduo Wang, et Wei Lu.
|
| 948 |
+
\newblock {TinyLlama}: An open-source small language model.
|
| 949 |
+
\newblock \emph{arXiv preprint arXiv:2401.02385}, 2024.
|
| 950 |
+
\newblock \url{https://arxiv.org/abs/2401.02385}
|
| 951 |
+
|
| 952 |
+
\end{thebibliography}
|
| 953 |
+
|
| 954 |
+
% ============================================================================
|
| 955 |
+
% Annexes
|
| 956 |
+
% ============================================================================
|
| 957 |
+
\appendix
|
| 958 |
+
\section{Tables Compl\`etes d'Hyperparam\`etres}
|
| 959 |
+
\label{app:hyperparams}
|
| 960 |
+
|
| 961 |
+
\begin{table}[H]
|
| 962 |
+
\centering
|
| 963 |
+
\caption{Configuration compl\`ete de pr\'e-entra\^inement pour Julian-600M.}
|
| 964 |
+
\begin{tabular}{lc}
|
| 965 |
+
\toprule
|
| 966 |
+
\textbf{Cat\'egorie} & \textbf{Valeur} \\
|
| 967 |
+
\midrule
|
| 968 |
+
\multicolumn{2}{l}{\textit{Mod\`ele}} \\
|
| 969 |
+
Param\`etres & $\sim$600M \\
|
| 970 |
+
Dimension cach\'ee & 1280 \\
|
| 971 |
+
Couches & 18 \\
|
| 972 |
+
T\^etes d'attention & 20 \\
|
| 973 |
+
Dimension par t\^ete & 64 \\
|
| 974 |
+
Dimension FFN & 5120 \\
|
| 975 |
+
Activation & SwiGLU (porte SiLU) \\
|
| 976 |
+
Normalisation & RMSNorm ($\epsilon = 10^{-6}$) \\
|
| 977 |
+
Encodage positionnel & RoPE ($\theta = 10\,000$) \\
|
| 978 |
+
Vocabulaire & 50\,000 (SentencePiece BPE) \\
|
| 979 |
+
Longueur de contexte & 2\,048 \\
|
| 980 |
+
Dropout & 0,1 \\
|
| 981 |
+
\midrule
|
| 982 |
+
\multicolumn{2}{l}{\textit{Optimisation}} \\
|
| 983 |
+
Optimiseur & AdamW \\
|
| 984 |
+
$\beta_1, \beta_2$ & 0,9 ; 0,95 \\
|
| 985 |
+
$\epsilon$ & $10^{-8}$ \\
|
| 986 |
+
D\'ecroissance des poids & 0,1 \\
|
| 987 |
+
Taux d'apprentissage max & $1,2 \times 10^{-3}$ \\
|
| 988 |
+
Taux d'apprentissage min & $1,2 \times 10^{-4}$ \\
|
| 989 |
+
Programme du taux & Cosinus avec warmup lin\'eaire \\
|
| 990 |
+
Pas de warmup & 3\,000 \\
|
| 991 |
+
Pas totaux & 300\,000 \\
|
| 992 |
+
Gradient clipping & 1,0 (norme globale) \\
|
| 993 |
+
Pr\'ecision \'etats optimiseur & bfloat16 \\
|
| 994 |
+
\midrule
|
| 995 |
+
\multicolumn{2}{l}{\textit{Calcul}} \\
|
| 996 |
+
Mat\'eriel & TPU v4-32 (32 puces, 4 h\^otes) \\
|
| 997 |
+
Batch par device & 4 \\
|
| 998 |
+
Accumulation de gradient & 8 \\
|
| 999 |
+
Taille de batch effective & 1\,024 \\
|
| 1000 |
+
Pr\'ecision & bfloat16 mixte \\
|
| 1001 |
+
Tokens par pas & $\sim$2,1M \\
|
| 1002 |
+
Tokens totaux & $\sim$39B \\
|
| 1003 |
+
Checkpointing & Orbax asynchrone, tous les 10K pas \\
|
| 1004 |
+
\bottomrule
|
| 1005 |
+
\end{tabular}
|
| 1006 |
+
\end{table}
|
| 1007 |
+
|
| 1008 |
+
\section{Disponibilit\'e des Mod\`eles}
|
| 1009 |
+
\label{app:availability}
|
| 1010 |
+
|
| 1011 |
+
Tous les mod\`eles Julian sont disponibles sur le HuggingFace Hub :
|
| 1012 |
+
|
| 1013 |
+
\begin{table}[H]
|
| 1014 |
+
\centering
|
| 1015 |
+
\caption{D\'ep\^ots HuggingFace des mod\`eles Julian.}
|
| 1016 |
+
\begin{tabular}{ll}
|
| 1017 |
+
\toprule
|
| 1018 |
+
\textbf{Mod\`ele} & \textbf{D\'ep\^ot HuggingFace} \\
|
| 1019 |
+
\midrule
|
| 1020 |
+
Julian-600M Base & \texttt{JulianKrgd/julian-600m-40b} \\
|
| 1021 |
+
Julian-600M-10B-Instruct-v0.1 & \texttt{JulianKrgd/julian-600m-10b-instruct-v0.1} \\
|
| 1022 |
+
Julian-600M SFT-30K & \texttt{JulianKrgd/julian-600m-40b-instruct-sft30k} \\
|
| 1023 |
+
Julian-600M SFT-100K & \texttt{JulianKrgd/julian-600m-40b-instruct-sft100k} \\
|
| 1024 |
+
\bottomrule
|
| 1025 |
+
\end{tabular}
|
| 1026 |
+
\end{table}
|
| 1027 |
+
|
| 1028 |
+
\end{document}
|