初始化项目,由ModelHub XC社区提供模型

Model: kurakurai/Luth-LFM2-1.2B
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-07-14 00:17:05 +08:00
commit 5804c608e4
14 changed files with 4400 additions and 0 deletions

96
README.md Normal file
View File

@@ -0,0 +1,96 @@
---
library_name: transformers
license: other
license_name: lfm1.0
license_link: LICENSE
datasets:
- kurakurai/luth-sft
language:
- fr
- en
base_model:
- LiquidAI/LFM2-1.2B
pipeline_tag: text-generation
tags:
- liquid
- lfm2
- luth
---
![Luth x LFM2](media/logo_collab.png)
# Luth-LFM2-1.2B
**Luth-LFM2-1.2B** is a French fine-tuned version of [LFM2-1.2B](https://huggingface.co/LiquidAI/LFM2-1.2B) in collaboration with Liquid AI, trained on the [Luth-SFT](https://huggingface.co/datasets/kurakurai/luth-sft) dataset. The model has improved its French capabilities in instruction following, math, and general knowledge. Additionally, its English capabilities have remained stable or slightly improved such as in Maths.
Our Evaluation, training and data scripts are available on [GitHub](https://github.com/kurakurai/Luth), along with the [Blog](https://huggingface.co/blog/MaxLSB/luth) we wrote, to further detail our recipe.
![Luth-LFM2 graph](media/lfm2-luth.png)
## Model Details
The model was trained using full fine-tuning on the Luth-SFT dataset with [Axolotl](https://github.com/axolotl-ai-cloud/axolotl). The resulting model was then merged back with LFM2-1.2B. This process successfully retained the model's English capabilities while improving its performance in French.
## Benchmark Results
We used LightEval for evaluation, with custom tasks for the French benchmarks. The models were evaluated with a `temperature=0`.
### French Benchmark Scores
| Model | IFEval<br>French | GPQA-Diamond<br>French | MMLU<br>French | Math500<br>French | Arc-Challenge<br>French | Hellaswag<br>French |
| --------------------- | ---------------- | ---------------------- | -------------- | ----------------- | ----------------------- | ------------------- |
| **Luth-LFM2-1.2B** | <u>59.95</u> | 28.93 | <u>48.02</u> | 45.80 | 38.98 | 36.81 |
| LFM2-1.2B | 54.41 | 22.84 | 47.59 | 36.80 | <u>39.44</u> | 33.05 |
| Qwen3-1.7B | 54.71 | <u>31.98</u> | 28.49 | <u>60.40</u> | 33.28 | 24.86 |
| SmolLM2-1.7B-Instruct | 30.93 | 20.30 | 33.73 | 10.20 | 28.57 | <u>49.58</u> |
| Qwen2.5-1.5B-Instruct | 31.30 | 27.41 | 46.25 | 33.20 | 32.68 | 34.33 |
### English Benchmark Scores
| Model | IFEval<br>English | GPQA-Diamond<br>English | MMLU<br>English | Math500<br>English | Arc-Challenge<br>English | Hellaswag<br>English |
| --------------------- | ----------------- | ----------------------- | --------------- | ------------------ | ------------------------ | -------------------- |
| **Luth-LFM2-1.2B** | <u>70.55</u> | 30.30 | 54.58 | 50.60 | <u>43.26</u> | 58.42 |
| LFM2-1.2B | 68.52 | 24.24 | 55.22 | 45.80 | 42.58 | 57.61 |
| Qwen3-1.7B | 68.88 | <u>31.82<u> | 52.82 | <u>71.20</u> | 36.18 | 46.98 |
| SmolLM2-1.7B-Instruct | 49.04 | 25.08 | 50.27 | 22.67 | 42.32 | <u>66.94</u> |
| Qwen2.5-1.5B-Instruct | 39.99 | 25.76 | <u>59.81</u> | 57.20 | 41.04 | 64.48 |
## Code Example
```python
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("kurakurai/Luth-LFM2-1.2B")
model = AutoModelForCausalLM.from_pretrained("kurakurai/Luth-LFM2-1.2B")
messages = [
{"role": "user", "content": "Quelle est la capitale de la France?"},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=100)
print(
tokenizer.decode(
outputs[0][inputs["input_ids"].shape[-1] :], skip_special_tokens=True
)
)
```
## Citation
```bibtex
@misc{luth2025kurakurai,
title = {Luth: Efficient French Specialization for Small Language Models and Cross-Lingual Transfer},
author = {Lasbordes, Maxence and Gad, Sinoué},
year = {2025},
howpublished = {\url{https://arxiv.org/abs/2510.05846}},
note = {arXiv:2510.05846}
}
```