Update README.md
Browse files
README.md
CHANGED
@@ -1,16 +1,52 @@
|
|
1 |
---
|
2 |
-
language:
|
3 |
-
- fr
|
4 |
-
license: mit
|
5 |
tags:
|
6 |
- text-generation-inference
|
7 |
- transformers
|
8 |
-
-
|
9 |
- chocolatine
|
|
|
|
|
|
|
10 |
---
|
11 |
|
12 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
|
14 |
-
- **Developed by:**
|
15 |
- **License:** MIT
|
16 |
-
- **Finetuned from model :**
|
|
|
1 |
---
|
|
|
|
|
|
|
2 |
tags:
|
3 |
- text-generation-inference
|
4 |
- transformers
|
5 |
+
- sft
|
6 |
- chocolatine
|
7 |
+
license: mit
|
8 |
+
language:
|
9 |
+
- fr
|
10 |
---
|
11 |
|
12 |
+
# Description model
|
13 |
+
|
14 |
+
Chocolatine-3B version specialized in French culinary language, supervised fine-tuning of [microsoft/Phi-3.5-mini-instruct](https://huggingface.co/microsoft/Phi-3.5-mini-instruct).
|
15 |
+
This model is based on 283 specific terms and definitions of French cuisine.
|
16 |
+
|
17 |
+
# Fine Tuning
|
18 |
+
|
19 |
+
Fine tuning done efficiently with Unsloth,
|
20 |
+
with which I saved processing time on a single T4 GPU (AzureML compute instance).
|
21 |
+
|
22 |
+
For this version of the model I experimented a training method with a double fine-tuning, SFT then DPO.
|
23 |
+
I generated two datasets exclusively for this model, with GPT-4o deployed on Azure OpenAI.
|
24 |
+
The challenge was to achieve a consistent alignment between the two fine-tuning methods.
|
25 |
+
SFT to teach the terms and DPO to reinforce the understanding achieved during the first learning.
|
26 |
+
|
27 |
+
# Usage
|
28 |
+
|
29 |
+
The recommended usage is by loading the low-rank adapter using unsloth:
|
30 |
+
|
31 |
+
```python
|
32 |
+
from unsloth import FastLanguageModel
|
33 |
+
|
34 |
+
model_name = "jpacifico/chocolatine-admin-3B-sft-v0.2"
|
35 |
+
model, tokenizer = FastLanguageModel.from_pretrained(
|
36 |
+
model_name = model_name,
|
37 |
+
max_seq_length = 2048,
|
38 |
+
dtype = None,
|
39 |
+
load_in_4bit = True,
|
40 |
+
)
|
41 |
+
|
42 |
+
FastLanguageModel.for_inference(model)
|
43 |
+
```
|
44 |
+
|
45 |
+
### Limitations
|
46 |
+
|
47 |
+
The Chocolatine model is a quick demonstration that a base model can be easily fine-tuned to achieve compelling performance.
|
48 |
+
It does not have any moderation mechanism.
|
49 |
|
50 |
+
- **Developed by:** Jonathan Pacifico, 2024
|
51 |
- **License:** MIT
|
52 |
+
- **Finetuned from model :** microsoft/Phi-3.5-mini-instruct
|