llamafactory/alpaca_gpt4_zh
Viewer • Updated • 42.7k • 5.19k • 19
How to use ControlLLM/Llama-3.1-8B-SynE-Concat16-Lerp with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="ControlLLM/Llama-3.1-8B-SynE-Concat16-Lerp") # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("ControlLLM/Llama-3.1-8B-SynE-Concat16-Lerp", dtype="auto")How to use ControlLLM/Llama-3.1-8B-SynE-Concat16-Lerp with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "ControlLLM/Llama-3.1-8B-SynE-Concat16-Lerp"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "ControlLLM/Llama-3.1-8B-SynE-Concat16-Lerp",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/ControlLLM/Llama-3.1-8B-SynE-Concat16-Lerp
How to use ControlLLM/Llama-3.1-8B-SynE-Concat16-Lerp with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "ControlLLM/Llama-3.1-8B-SynE-Concat16-Lerp" \
--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": "ControlLLM/Llama-3.1-8B-SynE-Concat16-Lerp",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "ControlLLM/Llama-3.1-8B-SynE-Concat16-Lerp" \
--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": "ControlLLM/Llama-3.1-8B-SynE-Concat16-Lerp",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use ControlLLM/Llama-3.1-8B-SynE-Concat16-Lerp with Docker Model Runner:
docker model run hf.co/ControlLLM/Llama-3.1-8B-SynE-Concat16-Lerp
This is a fine-tuned model of Llama-3.1-8B for muliligual-Chinese tasks on SynE dataset by Control LLM-Concat16-Lerp.
This model is associated with the paper: Control LLM: Controlled Evolution for Intelligence Retention in LLM.
This model is associated with the github: Control-LLM.
Here is an overview of the evaluation results and findings:
The table below summarizes evaluation results across Chinese tasks and original capabilities.
| Model | CEval | CEvalC | CMMLU | CMMLUC | C-Avg | BBH | MLU | MLUP | O-Avg | Overall |
|---|---|---|---|---|---|---|---|---|---|---|
| Llama3.1-8B | 48.3 | 12.8 | 51.1 | 14.1 | 13.9 | 65.2 | 65.4 | 35.5 | 45.9 | 29.9 |
| Llama-3-SynE | 57.7 | 22.3 | 57.1 | 22.8 | 22.8 | 61.9 | 64.0 | 32.6 | 42.9 | 32.9 |
| Full Param Tune | 59.0 | 40.2 | 60.2 | 44.3 | 43.8 | 64.8 | 64.9 | 35.0 | 45.4 | 44.6 |
| Stack Expansion | 56.0 | 32.7 | 55.2 | 33.4 | 33.3 | 62.3 | 65.6 | 35.3 | 44.8 | 39.1 |
| Concat-Lerp | 57.1 | 34.8 | 57.0 | 37.4 | 37.1 | 64.4 | 64.6 | 35.8 | 45.9 | 41.5 |
| Hybrid Expansion | 58.9 | 44.7 | 57.9 | 44.3 | 44.4 | 65.1 | 65.7 | 36.9 | 46.8 | 45.6 |
| Control LLM* | 57.0 | 44.7 | 56.0 | 44.9 | 44.8 | 68.2 | 65.6 | 37.9 | 48.5 | 46.7 |
Base model
meta-llama/Llama-3.1-8B