Text Generation
Transformers
Safetensors
French
English
qwen3
dpo
post-training
french
alignment
model-merging
chocolatine
comparia
conversational
text-generation-inference
Instructions to use jpacifico/Chocolatine-2-4B-Instruct-DPO-v2.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jpacifico/Chocolatine-2-4B-Instruct-DPO-v2.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jpacifico/Chocolatine-2-4B-Instruct-DPO-v2.1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("jpacifico/Chocolatine-2-4B-Instruct-DPO-v2.1") model = AutoModelForMultimodalLM.from_pretrained("jpacifico/Chocolatine-2-4B-Instruct-DPO-v2.1") messages = [ {"role": "user", "content": "Who are you?"}, ] 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jpacifico/Chocolatine-2-4B-Instruct-DPO-v2.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jpacifico/Chocolatine-2-4B-Instruct-DPO-v2.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jpacifico/Chocolatine-2-4B-Instruct-DPO-v2.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jpacifico/Chocolatine-2-4B-Instruct-DPO-v2.1
- SGLang
How to use jpacifico/Chocolatine-2-4B-Instruct-DPO-v2.1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "jpacifico/Chocolatine-2-4B-Instruct-DPO-v2.1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jpacifico/Chocolatine-2-4B-Instruct-DPO-v2.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "jpacifico/Chocolatine-2-4B-Instruct-DPO-v2.1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jpacifico/Chocolatine-2-4B-Instruct-DPO-v2.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jpacifico/Chocolatine-2-4B-Instruct-DPO-v2.1 with Docker Model Runner:
docker model run hf.co/jpacifico/Chocolatine-2-4B-Instruct-DPO-v2.1
Update README.md
Browse files
README.md
CHANGED
|
@@ -35,11 +35,17 @@ Optimized variants (MLX, GGUF) are also available, making the model particularly
|
|
| 35 |
- **Post training methods:** DPO + Model Merging
|
| 36 |
- **Objective:** Improve French instruction-following and reasoning through post-training, while maintaining strong multilingual performance and keeping the same model size.
|
| 37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
## Benchmarks
|
| 39 |
|
| 40 |
Performance improves consistently across all tested FR benchmarks :
|
| 41 |
|
| 42 |
-
| Benchmark |
|
| 43 |
|---|---:|---:|
|
| 44 |
| french_bench_arc_challenge | 47.13 | **49.79** |
|
| 45 |
| french_bench_grammar | 70.59 | **72.27** |
|
|
|
|
| 35 |
- **Post training methods:** DPO + Model Merging
|
| 36 |
- **Objective:** Improve French instruction-following and reasoning through post-training, while maintaining strong multilingual performance and keeping the same model size.
|
| 37 |
|
| 38 |
+
**Model Variants**
|
| 39 |
+
|
| 40 |
+
- Chocolatine-2-4B-Instruct-DPO-v2.1 (this repo): Contains the retrainable weights in BF16 format
|
| 41 |
+
- Quantized GGUF versions : [Q4_K_M](https://huggingface.co/jpacifico/Chocolatine-2-4B-Instruct-DPO-v2.1-Q4_K_M-GGUF) / [Q8_0](https://huggingface.co/jpacifico/Chocolatine-2-4B-Instruct-DPO-v2.1-Q8_0-GGUF)
|
| 42 |
+
- MLX (optimized for Apple silicon): [4Bit](https://huggingface.co/jpacifico/Chocolatine-2-4B-Instruct-DPO-v2.1-mlx-4Bit) / [6Bit](https://huggingface.co/jpacifico/Chocolatine-2-4B-Instruct-DPO-v2.1-mlx-8Bit)
|
| 43 |
+
|
| 44 |
## Benchmarks
|
| 45 |
|
| 46 |
Performance improves consistently across all tested FR benchmarks :
|
| 47 |
|
| 48 |
+
| Benchmark | Qwen3-4B-Thinking-2507 | Chocolatine-2-4B-Instruct-DPO-v2.1 |
|
| 49 |
|---|---:|---:|
|
| 50 |
| french_bench_arc_challenge | 47.13 | **49.79** |
|
| 51 |
| french_bench_grammar | 70.59 | **72.27** |
|