ai2-adapt-dev/gsm8k_math_ifeval_ground_truth_mixed
Viewer • Updated • 29.9k • 11 • 3
How to use bfuzzy1/acheron-m1a-llama with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="bfuzzy1/acheron-m1a-llama")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("bfuzzy1/acheron-m1a-llama", dtype="auto")How to use bfuzzy1/acheron-m1a-llama with PEFT:
Task type is invalid.
How to use bfuzzy1/acheron-m1a-llama with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "bfuzzy1/acheron-m1a-llama"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "bfuzzy1/acheron-m1a-llama",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/bfuzzy1/acheron-m1a-llama
How to use bfuzzy1/acheron-m1a-llama with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "bfuzzy1/acheron-m1a-llama" \
--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": "bfuzzy1/acheron-m1a-llama",
"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 "bfuzzy1/acheron-m1a-llama" \
--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": "bfuzzy1/acheron-m1a-llama",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use bfuzzy1/acheron-m1a-llama with Docker Model Runner:
docker model run hf.co/bfuzzy1/acheron-m1a-llama
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_path = "bfuzzy1/acheron-m1a-llama"
tokenizer = AutoTokenizer.from_pretrained(model_path)
model = AutoModelForCausalLM.from_pretrained(
model_path,
device_map="auto",
torch_dtype='auto',
trust_remote_code=True
)
messages = [
{"role": "user", "content": "What's 2 + 2 -3?"}
]
input_ids = tokenizer.apply_chat_template(conversation=messages, tokenize=True, add_generation_prompt=True, return_tensors='pt')
output_ids = model.generate(
input_ids.to('mps' if torch.backends.mps.is_available() else 'cpu'),
max_new_tokens=100
)
response = tokenizer.decode(output_ids[0][input_ids.shape[1]:], skip_special_tokens=True)
print(response)