Description model
Chocolatine-Admin-3B version specialized in French administrative language, supervised fine-tuning of jpacifico/Chocolatine-3B-Instruct-DPO-v1.2 based on microsoft/Phi-3.5-mini-instruct
Developed in collaboration with Microsoft.
Data & Training
The dataset based on the official lexicon published by the French DITP, gathers 2362 administrative terms constituting the basis of the simulation of prompt-answer pairs.
The GPT-4o model deployed on Azure OpenAI was used to carry out the building of the dataset in several phases:
- Extraction of the lexicon pages (previously converted into jpg format)
- Reformulation of the definitions to make them more readable and natural to be used by an LLM in order to ensure high quality data.
- Generation of questions from the terms and definitions
- Generation of answers in three successive rounds taking into account the previous generations to ensure variety.
For this 0.3b version, the Fine Tuning (SFT) was performed on 11 epochs with an A100 GPU instance on Azure Machine Learning.
Usage
You can run Chocolatine-Admin using the following code:
import transformers
from transformers import AutoTokenizer
# Format prompt
message = [
{"role": "system", "content": "You are a helpful assistant chatbot."},
{"role": "user", "content": "What is a Large Language Model?"}
]
tokenizer = AutoTokenizer.from_pretrained(new_model)
prompt = tokenizer.apply_chat_template(message, add_generation_prompt=True, tokenize=False)
# Create pipeline
pipeline = transformers.pipeline(
"text-generation",
model=new_model,
tokenizer=tokenizer
)
# Generate text
sequences = pipeline(
prompt,
do_sample=True,
temperature=0.7,
top_p=0.9,
num_return_sequences=1,
max_length=200,
)
print(sequences[0]['generated_text'])
Limitations
The Chocolatine model series is a quick demonstration that a base model can be easily fine-tuned to achieve compelling performance.
It does not have any moderation mechanism.
- Developed by: Jonathan Pacifico at Cellenza, in collaboration with Microsoft (2024)
- License: MIT
- Finetuned from model : jpacifico/Chocolatine-3B-Instruct-DPO-v1.2
- Downloads last month
- 94