GLauzza commited on
Commit
6642734
·
verified ·
1 Parent(s): 41c65e0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +81 -5
README.md CHANGED
@@ -12,15 +12,91 @@ tags:
12
  - Math
13
  - Reasoning
14
  ---
15
- #Mille-Pensées
 
 
16
 
17
  Mille-Pensées is a french math reaoning model finetuned on the [Mille-Pensées-Dataset](https://huggingface.co/datasets/GLauzza/Mille-Pensees-Dataset) from the [Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) model.
 
 
 
 
 
 
18
 
19
- <div style="display: flex; justify-content: center; gap: 10px;">
20
- <img src="images/cot_fr_res_radar.png" alt="Evaluation on French Math Data" width="400">
21
- <img src="images/cot_res_radar.png" alt="Evaluation on English Math Data" width="400">
22
  </div>
23
 
24
  <div align="center">
25
- <img src="images/en_bench_res_radar.png" alt="Evaluation on English Data" width="400">
26
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  - Math
13
  - Reasoning
14
  ---
15
+ # Mille-Pensées
16
+
17
+ ### Model Summary
18
 
19
  Mille-Pensées is a french math reaoning model finetuned on the [Mille-Pensées-Dataset](https://huggingface.co/datasets/GLauzza/Mille-Pensees-Dataset) from the [Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) model.
20
+ It performs similarly or better than [Qwen2.5-Math-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Math-7B-Instruct) on most French Math Benchmarks while reasoning in french instead of english.
21
+ I also offers superior performances on English Math and General Benchmarks.
22
+
23
+ <div align="center">
24
+ <img src="images/cot_fr_res_radar.png" alt="Evaluation on French Math Data" width="600">
25
+ </div>
26
 
27
+ <div align="center">
28
+ <img src="images/cot_res_radar.png" alt="Evaluation on English Math Data" width="600">
 
29
  </div>
30
 
31
  <div align="center">
32
+ <img src="images/en_bench_res_radar.png" alt="Evaluation on English Data" width="600">
33
  </div>
34
+
35
+ Evaluation was done with [vllm](https://github.com/vllm-project/vllm) and [math-verify](https://github.com/huggingface/Math-Verify) for Math benchmarks (`temperature=0.6`, `top_p=0.95`, `top_k=20`, `min_p=0`, `presence_penalty=0.5`, `max_tokens=38192`) and [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness) for the general English Benchmarks.
36
+
37
+ ## Usage
38
+
39
+ ```python
40
+ import torch
41
+ from transformers import AutoTokenizer, AutoModelForCausalLM
42
+
43
+ model_path = "GLauzza/Mille-Pensees"
44
+
45
+ # Load tokenizer and model
46
+ tokenizer = AutoTokenizer.from_pretrained(model_path)
47
+ model = AutoModelForCausalLM.from_pretrained(
48
+ model_path, torch_dtype=torch.float16, device_map="auto"
49
+ )
50
+
51
+ # Example input
52
+ messages = [{"role": "user", "content": "Combien vaut 1+1?"}]
53
+ input_ids = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors='pt').to("cuda")
54
+
55
+ generated_ids = model.generate(input_ids, max_new_tokens=38192, temperature=0.6, repetition_penalty=0.5, do_sample=True, eos_token_id=tokenizer.eos_token_id)
56
+ response = tokenizer.decode(generated_ids[0], skip_special_tokens=True, clean_up_tokenization_space=True)
57
+ print(f"Réponse: {response}")
58
+ ```
59
+
60
+ ## Training Details
61
+
62
+ | **Parameter** | **Value** |
63
+ |--------------|----------|
64
+ | Epochs | 3.16 |
65
+ | Global Batch Size | 192 |
66
+ | Learning Rate | 6e-5 |
67
+ | Scheduler | Cosine |
68
+ | Optimizer | AdamW |
69
+ | Warmup Steps | 100 |
70
+ | Weight Decay | 0.0 |
71
+ | Max Sequence Length | 18k |
72
+ | Sequence Packing | No |
73
+
74
+
75
+ ### ⚠️ Licenses
76
+
77
+ The base model of this finetuning [Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) is licensed under [Apache 2.0](https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/apache-2.0.md).
78
+
79
+ This model was finetuned on the [Mille-Pensées-Dataset](https://huggingface.co/datasets/GLauzza/Mille-Pensees-Dataset), which uses multiple datasets licensed under [MIT](https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/mit.md), [Apache 2.0](https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/apache-2.0.md) and [CC-BY-4.0](https://huggingface.co/datasets/choosealicense/licenses/blob/main/markdown/cc-by-4.0.md).
80
+ One of the subsets of the [Mille-Pensées-Dataset](https://huggingface.co/datasets/GLauzza/Mille-Pensees-Dataset) is [AM-DeepSeek-R1-0528-Distilled](https://huggingface.co/datasets/a-m-team/AM-DeepSeek-R1-0528-Distilled) and has the following limitation:
81
+ Developers should strictly limit the use of this project’s open-sourced code, data, models, and related artifacts to **research purposes only**. **Commercial use and any applications that could potentially cause harm are strictly prohibited**.
82
+ The content in this dataset does not reflect the views, beliefs, or endorsements of any individual or institution. The authors disclaim any responsibility for consequences arising from the use, misuse, or interpretation of the dataset and associated materials.
83
+
84
+ Therefore, if you want to use the Mille-pensées model, you must respect all those licenses and limitations.
85
+
86
+
87
+ ### Citation Information
88
+
89
+ This project was provided with computing AI and storage resources by GENCI at IDRIS thanks to the grant 2025-AD011011668R5 on the supercomputer Jean Zay's A100 and H100 partitions.
90
+
91
+ The authors are affiliated to LORIA, CNRS, Nancy, France.
92
+
93
+ If you use this dataset, please cite:
94
+ ```bibtex
95
+ @misc{Mille-Pensees,
96
+ title={Mille-Pensees},
97
+ url={https://huggingface.co/datasets/GLauzza/Mille-Pensees},
98
+ author={Gabriel Lauzzana, Imane Ouada, Christophe Cerisara},
99
+ month={December},
100
+ year={2025}
101
+ }
102
+ ```