Instructions to use mxz/llama3-8b-dpo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mxz/llama3-8b-dpo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mxz/llama3-8b-dpo")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("mxz/llama3-8b-dpo") model = AutoModelForMultimodalLM.from_pretrained("mxz/llama3-8b-dpo") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mxz/llama3-8b-dpo with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mxz/llama3-8b-dpo" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mxz/llama3-8b-dpo", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mxz/llama3-8b-dpo
- SGLang
How to use mxz/llama3-8b-dpo 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 "mxz/llama3-8b-dpo" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mxz/llama3-8b-dpo", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "mxz/llama3-8b-dpo" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mxz/llama3-8b-dpo", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mxz/llama3-8b-dpo with Docker Model Runner:
docker model run hf.co/mxz/llama3-8b-dpo
dataset Intruction
datasets:
- mxz/CValues_DPO
language:
- zh
- en
metrics:
- perplexity
pipeline_tag:
- text-generation
tags:
- DPO
- fintune
- alignment
- LoRA
- Llama-3
About mxz-llama-3-8B-sft
This model trained by SFT and PPO.
It's have coding, reasoing, chinese QA .
evaluation
Result:
| Model | MMLU | C-EVAL | C-MMLU |
|---|---|---|---|
| Llama-3-8B | 55.5 | 47.0 | 48.0 |
| Llama-3-8B-Instruct | 60.1 | 49.7 | 49.3 |
| Llama-3-8B-dpo | 62.2 | 49.9 | 49.4 |
- Llama-3-8B evaluation result from ymcui/Chinese-LLaMA-Alpaca-3
- Downloads last month
- 3