Klovis-ai/Klovis-442M-french-130426
Klovis-442M — French Language Model
A 442M-parameter French language model using a Recurrent-Depth Transformer architecture, fully designed and trained from scratch by Eric Houzelle.
Every component — architecture, training pipeline, and inference engine — was written in PyTorch without relying on any pre-trained weights or third-party model code. Trained end-to-end on a single NVIDIA L40S GPU.
Key Facts
Quick Start
pip install transformers torch safetensors sentencepieceConversational Mode (ChatML)
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "Klovis-ai/Klovis-442M-french-130426"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True)
prompt = (
"<|system|>\n"
"Tu es un assistant intelligent. Réponds directement et précisément.<|end|>\n"
"<|user|>\n"
"Que peut-on visiter à Paris ?<|end|>\n"
"<|assistant|>\n"
)
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
inputs["input_ids"],
max_new_tokens=200,
temperature=0.5,
top_p=0.85,
top_k=50,
do_sample=True,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))Special Tokens
Architecture — Recurrent-Depth Transformer
Klovis uses a Recurrent-Depth Transformer (inspired by OpenMythos/Parcae, Prairie et al. 2026), where a single Transformer block is applied iteratively:
Input → [Prelude: 4 layers] → [Shared Block x 8 steps] → [Coda: 4 layers] → OutputWhy Recurrent-Depth?
The RDT architecture achieves 442M effective parameters with significantly fewer unique parameters by reusing a single Transformer block across 8 depth steps. This enables:
- Deeper reasoning through iterative refinement
- Dynamic compute via ACT (positions that are "easy" halt early)
- Step specialization via Depth LoRA adapters
Training
Phase 1 — Pre-training
Phase 2 — Supervised Fine-Tuning (SFT)
Fine-tuned on curated French conversational datasets across 25 epochs, with prompt masking (only assistant tokens contribute to the loss).
SFT Datasets
Example Outputs
Here are real outputs from the model (temperature=0.2, topp=0.7, topk=30):
User: Bonjour Klovis: J'espère que vous allez bien ! Je suis ravi de partager mon expérience avec vous aujourd'hui. Si vous avez des questions spécifiques ou si vous souhaitez approfondir mes connaissances dans ce domaine, n'hésitez pas à me le faire savoir !
User: Que puis-je visiter à Paris ? Klovis: La Tour Eiffel est une structure emblématique située dans le cœur historique de Paris. Construite pour l'Exposition universelle de 1889, elle offre une vue imprenable sur la ville. Cette avenue pavée offre une expérience unique de shopping et d'histoire, avec ses nombreux cafés, restaurants et boutiques de luxe qui témoignent de son riche passé. Les visiteurs peuvent profiter d'une promenade matinale ou d'un dîner gastronomique dans un restaurant étoilé Michelin.
User: Explique-moi ce qu'est la gravité. Klovis: La gravité est une force qui agit sur tout objet ou chose, comme l'air ou l'eau dans son ensemble. Les effets de cette accélération peuvent varier considérablement selon les conditions atmosphériques. En résumé, la gravité est un concept fondamental en physique moderne, représentant la gravité comme un phénomène dynamique influencé par des facteurs tels que les mouvements tectoniques, les forces gravitationnelles et les champs électromagnétiques.
[!NOTE] The model produces fluent, well-structured French with rich vocabulary. Factual accuracy is limited (as expected for a 442M model trained from scratch) — responses may contain hallucinations or approximations.
What to Expect
With 442M parameters, Klovis produces:
- Grammatically correct, fluent French
- Well-structured responses (numbered lists, bold headers, paragraphs)
- Relevant vocabulary across science, culture, history
- Coherent conversational interactions
Known limitations:
- Factual responses may be incorrect or fabricated (hallucinations)
- Mathematical reasoning is limited
- Context limited to 512 tokens
- French only
This model demonstrates what a single developer can achieve with a novel architecture at small scale. It is not intended to replace larger models for production use.
License
Apache 2.0 — https://www.apache.org/licenses/LICENSE-2.0
Designed and trained by Eric Houzelle.
