Instructions to use caspar/MiniMind-Dense-64M-Hermes-FunctionCalling-SFT-v1.0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use caspar/MiniMind-Dense-64M-Hermes-FunctionCalling-SFT-v1.0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="caspar/MiniMind-Dense-64M-Hermes-FunctionCalling-SFT-v1.0", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("caspar/MiniMind-Dense-64M-Hermes-FunctionCalling-SFT-v1.0", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use caspar/MiniMind-Dense-64M-Hermes-FunctionCalling-SFT-v1.0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "caspar/MiniMind-Dense-64M-Hermes-FunctionCalling-SFT-v1.0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "caspar/MiniMind-Dense-64M-Hermes-FunctionCalling-SFT-v1.0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/caspar/MiniMind-Dense-64M-Hermes-FunctionCalling-SFT-v1.0
- SGLang
How to use caspar/MiniMind-Dense-64M-Hermes-FunctionCalling-SFT-v1.0 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "caspar/MiniMind-Dense-64M-Hermes-FunctionCalling-SFT-v1.0" \ --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": "caspar/MiniMind-Dense-64M-Hermes-FunctionCalling-SFT-v1.0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
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 "caspar/MiniMind-Dense-64M-Hermes-FunctionCalling-SFT-v1.0" \ --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": "caspar/MiniMind-Dense-64M-Hermes-FunctionCalling-SFT-v1.0", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use caspar/MiniMind-Dense-64M-Hermes-FunctionCalling-SFT-v1.0 with Docker Model Runner:
docker model run hf.co/caspar/MiniMind-Dense-64M-Hermes-FunctionCalling-SFT-v1.0
MiniMind-Dense-64M-Hermes-FunctionCalling-SFT-v1.0
Hermes SFT: 986 training conversations, 114 validation conversations; 1786 retained assistant targets; 3 epochs / 672 updates. Validation CE: 2.5424 โ 0.6658. Best epoch selected by validation CE.
Training and provenance
Base architecture: MiniMind Dense 64M. Original base revision: 7597c22aa4d3e7b2ac824b4b4be01158cccf1b8d. Hermes source: func-calling.json only, revision dae3e1d28cfbcf4b915c04ea1e072030529b4bda. Source rows: 1893. Conversion re-renders tools once in the existing MiniMind chat template; assistant calls and post-tool answers are supervised; system/user/tool/padding labels are masked. Conversation groups are split by a deterministic hash of the user text. Overlength assistant targets skipped without truncating their endings: 38. Invalid rows excluded: 793. All exclusions are recorded. No synthesized completion data was added.
SFT: full parameters, BF16 compute with FP32 training weights, batch 1 / accumulation 8, LR 2e-5 cosine to 2e-6, 3 epochs, max length 4096, seed 42, gradient clip 1.0. Epoch checkpoint chosen by validation CE. Validation generation examples are for inspection, not a held-out benchmark; function templates may overlap between splits.
Agent RL (RL artifact only): trainer/train_agent.py, CISPO, batch 4, four generations per prompt, response microbatch 1, LR 3e-7 cosine to 3e-8, beta 0.1, max 3 turns / 256 tokens per turn / 2500 retained training tokens, policy synchronization every 10 steps. SGLang 0.5.5 serves a weight-compatible Qwen3 export; the published model is native MiniMind. Reward model for general dialogue: Skywork/Skywork-Reward-V2-Qwen3-1.7B, revision e51ea3e08fb81326c3b812a7ff0cb9cee83e59cc, raw scores divided by 10 then clipped. Labeled tool tasks use execution/answer matching; unfinished trajectories are penalized -2 and repeated identical successful calls are penalized. Mock tools do not access live weather/time/exchange rates.
Both stages use one RTX 5090. Weights were strict-reloaded and checked finite. Exact settings, sample generations and raw metrics are in the adjacent JSON files. General capability, factual accuracy and reliable tool use are not guaranteed. Repeated calls or unsupported tool names may still occur. The 13-case agent sample is small and is not a general benchmark. Numeric matches use complete numbers; text matches remain case-insensitive substrings.
Usage
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
repo = 'caspar/MiniMind-Dense-64M-Hermes-FunctionCalling-SFT-v1.0'
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True, torch_dtype=torch.float32).eval()
text = tok.apply_chat_template([{'role':'user','content':'Hello'}], tokenize=False, add_generation_prompt=True, open_thinking=False)
x = tok(text, return_tensors='pt', add_special_tokens=False).input_ids
with torch.no_grad():
y = model.generate(x, max_new_tokens=128, do_sample=False, eos_token_id=tok.eos_token_id)
print(tok.decode(y[0, x.shape[1]:], skip_special_tokens=True))
Tool execution requires an external loop. Retain the tool schema and tool-response roles used in training.
Hermes is distributed with an Apache-2.0 notice. The original MiniMind code/base and other source terms continue to apply. The translated Agent RL dataset retains upstream Apache-2.0 and CC-BY-NC-2.0 notices; this card does not relicense those sources. See the source dataset/model cards.
- Downloads last month
- 139
Model tree for caspar/MiniMind-Dense-64M-Hermes-FunctionCalling-SFT-v1.0
Base model
caspar/MiniMind-Dense-64M-Mixed-SFT-v1.0