mlabonne/orpo-dpo-mix-40k-flat
Viewer • Updated • 44.2k • 118 • 14
How to use QuantFactory/Lama-DPOlphin-8B-GGUF with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="QuantFactory/Lama-DPOlphin-8B-GGUF")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("QuantFactory/Lama-DPOlphin-8B-GGUF", dtype="auto")How to use QuantFactory/Lama-DPOlphin-8B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="QuantFactory/Lama-DPOlphin-8B-GGUF", filename="Lama-DPOlphin-8B.Q2_K.gguf", )
llm.create_chat_completion(
messages = [
{
"role": "user",
"content": "What is the capital of France?"
}
]
)How to use QuantFactory/Lama-DPOlphin-8B-GGUF with llama.cpp:
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/Lama-DPOlphin-8B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/Lama-DPOlphin-8B-GGUF:Q4_K_M
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf QuantFactory/Lama-DPOlphin-8B-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf QuantFactory/Lama-DPOlphin-8B-GGUF:Q4_K_M
# 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/Lama-DPOlphin-8B-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf QuantFactory/Lama-DPOlphin-8B-GGUF:Q4_K_M
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/Lama-DPOlphin-8B-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf QuantFactory/Lama-DPOlphin-8B-GGUF:Q4_K_M
docker model run hf.co/QuantFactory/Lama-DPOlphin-8B-GGUF:Q4_K_M
How to use QuantFactory/Lama-DPOlphin-8B-GGUF with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "QuantFactory/Lama-DPOlphin-8B-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/Lama-DPOlphin-8B-GGUF",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/QuantFactory/Lama-DPOlphin-8B-GGUF:Q4_K_M
How to use QuantFactory/Lama-DPOlphin-8B-GGUF with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "QuantFactory/Lama-DPOlphin-8B-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/Lama-DPOlphin-8B-GGUF",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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/Lama-DPOlphin-8B-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/Lama-DPOlphin-8B-GGUF",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use QuantFactory/Lama-DPOlphin-8B-GGUF with Ollama:
ollama run hf.co/QuantFactory/Lama-DPOlphin-8B-GGUF:Q4_K_M
How to use QuantFactory/Lama-DPOlphin-8B-GGUF with Unsloth Studio:
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/Lama-DPOlphin-8B-GGUF to start chatting
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/Lama-DPOlphin-8B-GGUF to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for QuantFactory/Lama-DPOlphin-8B-GGUF to start chatting
How to use QuantFactory/Lama-DPOlphin-8B-GGUF with Docker Model Runner:
docker model run hf.co/QuantFactory/Lama-DPOlphin-8B-GGUF:Q4_K_M
How to use QuantFactory/Lama-DPOlphin-8B-GGUF with Lemonade:
# Download Lemonade from https://lemonade-server.ai/ lemonade pull QuantFactory/Lama-DPOlphin-8B-GGUF:Q4_K_M
lemonade run user.Lama-DPOlphin-8B-GGUF-Q4_K_M
lemonade list
This is quantized version of CultriX/Lama-DPOlphin-8B created using llama.cpp
base_model: cognitivecomputations/dolphin-2.9.4-llama3.1-8b
model_type: LlamaForCausalLM
tokenizer_type: AutoTokenizer
tokenizer:
name_or_path: "https://huggingface.co/cognitivecomputations/dolphin-2.9.4-llama3.1-8b/resolve/main/tokenizer.json"
load_in_8bit: false
load_in_4bit: true
strict: false
save_safetensors: true
bnb_4bit_quant_type: "nf4"
bnb_4bit_compute_dtype: "bf16"
bnb_4bit_use_double_quant: true
rl: dpo
chat_template: chatml
datasets:
- path: mlabonne/orpo-dpo-mix-40k-flat
split: train
type: chatml.intel
dataset_prepared_path: /workspace/axolotl/dataset-prepared
val_set_size: 0.0
output_dir: ./out
adapter: qlora
lora_model_dir:
sequence_len: 2048
sample_packing: false
pad_to_sequence_len: false
lora_r: 64
lora_alpha: 32
lora_dropout: 0.05
lora_target_linear: true
lora_fan_in_fan_out:
lora_target_modules:
wandb_project: axolotl
wandb_entity:
wandb_watch:
wandb_name:
wandb_log_model:
gradient_accumulation_steps: 4 # Reduced from 8 to 4 due to large VRAM
micro_batch_size: 2 # Increased micro-batch size to 2
num_epochs: 1
optimizer: paged_adamw_8bit
lr_scheduler: cosine
learning_rate: 5e-6
train_on_inputs: false
group_by_length: false
bf16: true # Use bf16 as it is optimal for A40 GPUs
fp16: false
tf32: true # TF32 is supported by A40 and improves performance
gradient_checkpointing: true
early_stopping_patience:
resume_from_checkpoint:
local_rank:
logging_steps: 1
xformers_attention:
flash_attention: true
warmup_steps: 100
evals_per_epoch: 0
eval_table_size:
eval_table_max_new_tokens: 128
saves_per_epoch: 1
debug:
deepspeed: deepspeed_configs/zero2.json # Enable DeepSpeed with ZeRO Stage 2
weight_decay: 0.0
special_tokens:
pad_token: <|end_of_text|>
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
Base model
meta-llama/Llama-3.1-8B