adamo1139/uninstruct-v1-experimental-chatml
Viewer • Updated • 42.6k • 26
How to use adamo1139/Yi-34B-200K-Un-Instruct-1906 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="adamo1139/Yi-34B-200K-Un-Instruct-1906") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("adamo1139/Yi-34B-200K-Un-Instruct-1906")
model = AutoModelForCausalLM.from_pretrained("adamo1139/Yi-34B-200K-Un-Instruct-1906", device_map="auto")How to use adamo1139/Yi-34B-200K-Un-Instruct-1906 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "adamo1139/Yi-34B-200K-Un-Instruct-1906"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "adamo1139/Yi-34B-200K-Un-Instruct-1906",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/adamo1139/Yi-34B-200K-Un-Instruct-1906
How to use adamo1139/Yi-34B-200K-Un-Instruct-1906 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "adamo1139/Yi-34B-200K-Un-Instruct-1906" \
--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": "adamo1139/Yi-34B-200K-Un-Instruct-1906",
"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 "adamo1139/Yi-34B-200K-Un-Instruct-1906" \
--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": "adamo1139/Yi-34B-200K-Un-Instruct-1906",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use adamo1139/Yi-34B-200K-Un-Instruct-1906 with Docker Model Runner:
docker model run hf.co/adamo1139/Yi-34B-200K-Un-Instruct-1906
1 epoch on adamo1139/uninstruct-v1-experimental-chatml. I used GaLore.
Purpose of this model is to make the model un-learn to use chatml-specific code words such as: <|im_start|>, <|im_end|>, user, assistant.
This is a base model meant for further finetuning. I think much of OpenAI slop is still left in there, so it's probably best combined with preference optimization method like DPO, ORPO or SPO for best results.