Instructions to use QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF", dtype="auto") - llama-cpp-python
How to use QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF", filename="Chocolatine-3B-Instruct-DPO-v1.2.Q2_K.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 QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF:Q4_K_M
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 QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF:Q4_K_M
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 QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF:Q4_K_M
Use Docker
docker model run hf.co/QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-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": "QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF:Q4_K_M
- SGLang
How to use QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-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 "QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-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": "QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-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 "QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-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": "QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF with Ollama:
ollama run hf.co/QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF:Q4_K_M
- Unsloth Studio
How to use QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-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 QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-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 QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF with Docker Model Runner:
docker model run hf.co/QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF:Q4_K_M
- Lemonade
How to use QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Chocolatine-3B-Instruct-DPO-v1.2-GGUF-Q4_K_M
List all available models
lemonade list
QuantFactory/Chocolatine-3B-Instruct-DPO-v1.2-GGUF
This is quantized version of jpacifico/Chocolatine-3B-Instruct-DPO-v1.2 created using llama.cpp
Original Model Card
Chocolatine-3B-Instruct-DPO-v1.2
DPO fine-tuned of microsoft/Phi-3.5-mini-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.
The model supports 128K context length.
OpenLLM Leaderboard
TBD.
MT-Bench-French
Chocolatine-3B-Instruct-DPO-v1.2 is outperforming Phi-3-medium-4k-instruct (14B) and its base model Phi-3.5-mini-instruct on MT-Bench-French, used with multilingual-mt-bench and GPT-4-Turbo as LLM-judge.
########## First turn ##########
score
model turn
gpt-4o-mini 1 9.2875
Chocolatine-14B-Instruct-4k-DPO 1 8.6375
Chocolatine-14B-Instruct-DPO-v1.2 1 8.6125
Phi-3.5-mini-instruct 1 8.5250
Chocolatine-3B-Instruct-DPO-v1.2 1 8.3750
Phi-3-medium-4k-instruct 1 8.2250
gpt-3.5-turbo 1 8.1375
Chocolatine-3B-Instruct-DPO-Revised 1 7.9875
Daredevil-8B 1 7.8875
Meta-Llama-3.1-8B-Instruct 1 7.0500
vigostral-7b-chat 1 6.7875
Mistral-7B-Instruct-v0.3 1 6.7500
gemma-2-2b-it 1 6.4500
French-Alpaca-7B-Instruct_beta 1 5.6875
vigogne-2-7b-chat 1 5.6625
########## Second turn ##########
score
model turn
gpt-4o-mini 2 8.912500
Chocolatine-14B-Instruct-DPO-v1.2 2 8.337500
Chocolatine-3B-Instruct-DPO-Revised 2 7.937500
Chocolatine-3B-Instruct-DPO-v1.2 2 7.862500
Phi-3-medium-4k-instruct 2 7.750000
Chocolatine-14B-Instruct-4k-DPO 2 7.737500
gpt-3.5-turbo 2 7.679167
Phi-3.5-mini-instruct 2 7.575000
Daredevil-8B 2 7.087500
Meta-Llama-3.1-8B-Instruct 2 6.787500
Mistral-7B-Instruct-v0.3 2 6.500000
vigostral-7b-chat 2 6.162500
gemma-2-2b-it 2 6.100000
French-Alpaca-7B-Instruct_beta 2 5.487395
vigogne-2-7b-chat 2 2.775000
########## Average ##########
score
model
gpt-4o-mini 9.100000
Chocolatine-14B-Instruct-DPO-v1.2 8.475000
Chocolatine-14B-Instruct-4k-DPO 8.187500
Chocolatine-3B-Instruct-DPO-v1.2 8.118750
Phi-3.5-mini-instruct 8.050000
Phi-3-medium-4k-instruct 7.987500
Chocolatine-3B-Instruct-DPO-Revised 7.962500
gpt-3.5-turbo 7.908333
Daredevil-8B 7.487500
Meta-Llama-3.1-8B-Instruct 6.918750
Mistral-7B-Instruct-v0.3 6.625000
vigostral-7b-chat 6.475000
gemma-2-2b-it 6.275000
French-Alpaca-7B-Instruct_beta 5.587866
vigogne-2-7b-chat 4.218750
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-v1.2-Q4_K_M-GGUF
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
- 258
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit