jondurbin/airoboros-2.2.1
Viewer • Updated • 42.7k • 355 • 42
How to use teknium/airoboros-mistral2.2-7b with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="teknium/airoboros-mistral2.2-7b") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("teknium/airoboros-mistral2.2-7b")
model = AutoModelForCausalLM.from_pretrained("teknium/airoboros-mistral2.2-7b")How to use teknium/airoboros-mistral2.2-7b with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "teknium/airoboros-mistral2.2-7b"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "teknium/airoboros-mistral2.2-7b",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/teknium/airoboros-mistral2.2-7b
How to use teknium/airoboros-mistral2.2-7b with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "teknium/airoboros-mistral2.2-7b" \
--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": "teknium/airoboros-mistral2.2-7b",
"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 "teknium/airoboros-mistral2.2-7b" \
--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": "teknium/airoboros-mistral2.2-7b",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use teknium/airoboros-mistral2.2-7b with Docker Model Runner:
docker model run hf.co/teknium/airoboros-mistral2.2-7b
Mistral trained with the airoboros dataset!
Actual dataset is airoboros 2.2, but it seems to have been replaced on hf with 2.2.1.
Prompt Format:
USER: <prompt>
ASSISTANT:
TruthfulQA:
hf-causal-experimental (pretrained=/home/teknium/dakota/lm-evaluation-harness/airoboros2.2-mistral/,dtype=float16), limit: None, provide_description: False, num_fewshot: 0, batch_size: 8
| Task |Version|Metric|Value | |Stderr|
|-------------|------:|------|-----:|---|-----:|
|truthfulqa_mc| 1|mc1 |0.3562|± |0.0168|
| | |mc2 |0.5217|± |0.0156|
Wandb training charts: https://wandb.ai/teknium1/airoboros-mistral-7b/runs/airoboros-mistral-1?workspace=user-teknium1
More info to come