Instructions to use GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF", dtype="auto") - llama-cpp-python
How to use GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF", filename="Chocolatine-3B-Instruct-DPO-Revised-Q4_0.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF:Q4_0 # Run inference directly in the terminal: llama-cli -hf GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF:Q4_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF:Q4_0 # Run inference directly in the terminal: llama-cli -hf GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF:Q4_0
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF:Q4_0 # Run inference directly in the terminal: ./llama-cli -hf GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF:Q4_0
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF:Q4_0 # Run inference directly in the terminal: ./build/bin/llama-cli -hf GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF:Q4_0
Use Docker
docker model run hf.co/GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF:Q4_0
- LM Studio
- Jan
- vLLM
How to use GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF:Q4_0
- SGLang
How to use GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF 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 "GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF" \ --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": "GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF", "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 "GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF" \ --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": "GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF with Ollama:
ollama run hf.co/GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF:Q4_0
- Unsloth Studio
How to use GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF to start chatting
- Docker Model Runner
How to use GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF with Docker Model Runner:
docker model run hf.co/GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF:Q4_0
- Lemonade
How to use GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF:Q4_0
Run and chat with the model
lemonade run user.Chocolatine-3B-Instruct-DPO-Revised-GGUF-Q4_0
List all available models
lemonade list
llm.create_chat_completion(
messages = [
{
"role": "user",
"content": "What is the capital of France?"
}
]
)This is a model that is assumed to perform well, but may require more testing and user feedback. Be aware, only models featured within the GUI of GPT4All, are curated and officially supported by Nomic. Use at your own risk.
About
- Static quants of https://huggingface.co/jpacifico/Chocolatine-3B-Instruct-DPO-Revised at commit fa3e742
- Quantized by ThiloteE with llama.cpp commit e09a800
These quants were created with a customized configuration that have been proven to not cause visible end of string (eos) tokens during inference with GPT4All. The config.json, generation_config.json and tokenizer_config.json differ from the original configuration as can be found in the original model's repository at the time of creation of these quants.
Prompt Template (for GPT4All)
Example System Prompt:
<|system|>
Vous trouverez ci-dessous une instruction décrivant une tâche. Rédigez une réponse qui réponde de manière appropriée à la demande.<|end|>
Chat Template:
<|user|>
%1<|end|>
<|assistant|>
%2<|end|>
Context Length
4096
Use a lower value during inference, if you do not have enough RAM or VRAM.
Provided Quants
| Link | Type | Size/GB | Notes |
|---|---|---|---|
| GGUF | Q4_0 | 2.44 | fast, recommended |
About GGUF
If you are unsure how to use GGUF files, refer to one of TheBloke's READMEs for more details, including on how to concatenate multi-part files.
Here is a handy graph by ikawrakow comparing some quant types (lower is better):
And here are Artefact2's thoughts on the matter: https://gist.github.com/Artefact2/b5f810600771265fc1e39442288e8ec9
Thanks
I thank Mradermacher and TheBloke for Inspiration to this model card and their contributions to open source. Also 3Simplex for lots of help along the way. Shoutout to the GPT4All and llama.cpp communities :-)
Original Model card:
Chocolatine-3B-Instruct-DPO-Revised
DPO fine-tuned of microsoft/Phi-3-mini-4k-instruct (3.82B params)
using the jpacifico/french-orca-dpo-pairs-revised rlhf dataset.
Training in French also improves the model in English, surpassing the performances of its base model.
Window context = 4k tokens
Benchmarks
Chocolatine is the best-performing 3B model on the OpenLLM Leaderboard (august 2024)
| Metric | Value |
|---|---|
| Avg. | 27.63 |
| IFEval (0-Shot) | 56.23 |
| BBH (3-Shot) | 37.16 |
| MATH Lvl 5 (4-Shot) | 14.5 |
| GPQA (0-shot) | 9.62 |
| MuSR (0-shot) | 15.1 |
| MMLU-PRO (5-shot) | 33.21 |
MT-Bench-French
Chocolatine-3B-Instruct-DPO-Revised is outperforming GPT-3.5-Turbo on MT-Bench-French by Bofeng Huang,
used with multilingual-mt-bench
########## First turn ##########
score
model turn
gpt-3.5-turbo 1 8.1375
Chocolatine-3B-Instruct-DPO-Revised 1 7.9875
Daredevil-8B 1 7.8875
Daredevil-8B-abliterated 1 7.8375
Chocolatine-3B-Instruct-DPO-v1.0 1 7.6875
NeuralDaredevil-8B-abliterated 1 7.6250
Phi-3-mini-4k-instruct 1 7.2125
Meta-Llama-3-8B-Instruct 1 7.1625
vigostral-7b-chat 1 6.7875
Mistral-7B-Instruct-v0.3 1 6.7500
Mistral-7B-Instruct-v0.2 1 6.2875
French-Alpaca-7B-Instruct_beta 1 5.6875
vigogne-2-7b-chat 1 5.6625
vigogne-2-7b-instruct 1 5.1375
########## Second turn ##########
score
model turn
Chocolatine-3B-Instruct-DPO-Revised 2 7.937500
gpt-3.5-turbo 2 7.679167
Chocolatine-3B-Instruct-DPO-v1.0 2 7.612500
NeuralDaredevil-8B-abliterated 2 7.125000
Daredevil-8B 2 7.087500
Daredevil-8B-abliterated 2 6.873418
Meta-Llama-3-8B-Instruct 2 6.800000
Mistral-7B-Instruct-v0.2 2 6.512500
Mistral-7B-Instruct-v0.3 2 6.500000
Phi-3-mini-4k-instruct 2 6.487500
vigostral-7b-chat 2 6.162500
French-Alpaca-7B-Instruct_beta 2 5.487395
vigogne-2-7b-chat 2 2.775000
vigogne-2-7b-instruct 2 2.240506
########## Average ##########
score
model
Chocolatine-3B-Instruct-DPO-Revised 7.962500
gpt-3.5-turbo 7.908333
Chocolatine-3B-Instruct-DPO-v1.0 7.650000
Daredevil-8B 7.487500
NeuralDaredevil-8B-abliterated 7.375000
Daredevil-8B-abliterated 7.358491
Meta-Llama-3-8B-Instruct 6.981250
Phi-3-mini-4k-instruct 6.850000
Mistral-7B-Instruct-v0.3 6.625000
vigostral-7b-chat 6.475000
Mistral-7B-Instruct-v0.2 6.400000
French-Alpaca-7B-Instruct_beta 5.587866
vigogne-2-7b-chat 4.218750
vigogne-2-7b-instruct 3.698113
Usage
You can run this model using my Colab notebook
You can also run Chocolatine 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'])
4-bit quantized version is available here : jpacifico/Chocolatine-3B-Instruct-DPO-Revised-Q4_K_M-GGUF
Ollama: jpacifico/chocolatine-3b
ollama run jpacifico/chocolatine-3b
Ollama Modelfile example :
FROM ./chocolatine-3b-instruct-dpo-revised-q4_k_m.gguf
TEMPLATE """{{ if .System }}<|system|>
{{ .System }}<|end|>
{{ end }}{{ if .Prompt }}<|user|>
{{ .Prompt }}<|end|>
{{ end }}<|assistant|>
{{ .Response }}<|end|>
"""
PARAMETER stop """{"stop": ["<|end|>","<|user|>","<|assistant|>"]}"""
SYSTEM """You are a friendly assistant called Chocolatine."""
Limitations
The Chocolatine model 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, 2024
- Model type: LLM
- Language(s) (NLP): French, English
- License: MIT
- Downloads last month
- 135
4-bit


# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="GPT4All-Community/Chocolatine-3B-Instruct-DPO-Revised-GGUF", filename="", )