NousResearch/hermes-function-calling-v1
Viewer • Updated • 11.6k • 28.1k • 410
How to use mrcuddle/Dark-Hermes3-Llama3.2-3B-Func with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="mrcuddle/Dark-Hermes3-Llama3.2-3B-Func")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("mrcuddle/Dark-Hermes3-Llama3.2-3B-Func")
model = AutoModelForCausalLM.from_pretrained("mrcuddle/Dark-Hermes3-Llama3.2-3B-Func")
messages = [
{"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=40)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use mrcuddle/Dark-Hermes3-Llama3.2-3B-Func with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "mrcuddle/Dark-Hermes3-Llama3.2-3B-Func"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "mrcuddle/Dark-Hermes3-Llama3.2-3B-Func",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/mrcuddle/Dark-Hermes3-Llama3.2-3B-Func
How to use mrcuddle/Dark-Hermes3-Llama3.2-3B-Func with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "mrcuddle/Dark-Hermes3-Llama3.2-3B-Func" \
--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": "mrcuddle/Dark-Hermes3-Llama3.2-3B-Func",
"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 "mrcuddle/Dark-Hermes3-Llama3.2-3B-Func" \
--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": "mrcuddle/Dark-Hermes3-Llama3.2-3B-Func",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use mrcuddle/Dark-Hermes3-Llama3.2-3B-Func with Docker Model Runner:
docker model run hf.co/mrcuddle/Dark-Hermes3-Llama3.2-3B-Func
axolotl version: 0.8.0.dev0
base_model: mrcuddle/Dark-Hermes3-Llama3.2-3B
hub_model_id: mrcuddle/Dark-Hermes3-Llama3.2-3B-Func
dataloader_num_workers: 8
datasets:
- chat_template: alpaca
field_messages: conversations
message_property_mappings:
content: value
role: from
path: NousResearch/hermes-function-calling-v1
split: train
type: chat_template
eval_steps: 500
evaluation_strategy: steps
fp16: true
gradient_accumulation_steps: 4
gradient_checkpointing: true
learning_rate: 2e-5
logging_dir: /content/outputs/logs
logging_steps: 50
lr_scheduler: linear
lr_scheduler_type: linear
micro_batch_size: 2
num_train_epochs: 3
optimizer: adamw_torch # Or another optimizer of your choice
output_dir: /content/outputs
overwrite_output_dir: true
per_device_train_batch_size: 8
save_steps: 500
save_total_limit: 2
use_peft: false
val_set_size: 0.05
warmup_steps: 100
unsloth: true # Enable Unsloth if supported by your training framework
This model is a fine-tuned version of mrcuddle/Dark-Hermes3-Llama3.2-3B on the NousResearch/hermes-function-calling-v1 dataset.
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| No log | 0.0889 | 1 | 0.3864 |