Instructions to use gittensor-model-hub/SparkHermes-27B-v1-NVFP4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gittensor-model-hub/SparkHermes-27B-v1-NVFP4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="gittensor-model-hub/SparkHermes-27B-v1-NVFP4") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("gittensor-model-hub/SparkHermes-27B-v1-NVFP4") model = AutoModelForMultimodalLM.from_pretrained("gittensor-model-hub/SparkHermes-27B-v1-NVFP4", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use gittensor-model-hub/SparkHermes-27B-v1-NVFP4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gittensor-model-hub/SparkHermes-27B-v1-NVFP4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gittensor-model-hub/SparkHermes-27B-v1-NVFP4", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/gittensor-model-hub/SparkHermes-27B-v1-NVFP4
- SGLang
How to use gittensor-model-hub/SparkHermes-27B-v1-NVFP4 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 "gittensor-model-hub/SparkHermes-27B-v1-NVFP4" \ --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": "gittensor-model-hub/SparkHermes-27B-v1-NVFP4", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "gittensor-model-hub/SparkHermes-27B-v1-NVFP4" \ --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": "gittensor-model-hub/SparkHermes-27B-v1-NVFP4", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use gittensor-model-hub/SparkHermes-27B-v1-NVFP4 with Docker Model Runner:
docker model run hf.co/gittensor-model-hub/SparkHermes-27B-v1-NVFP4
SparkHermes-27B-v1-NVFP4
The model the Spark-Hermes competition serves from era e1:
ukisai/Swift-Qwen3.8-27b fine-tuned on its own verified
bug fixes in the Spark-Hermes agent sandbox, then quantized to NVFP4 for the RTX 5090 (sm_120).
What changed from Swift
Full-parameter fine-tuning on 2,199 agent turns from 168 verified fixes of 91 bugs in 42 Python repositories (SWE-smith bugs, from repositories the competition never draws tasks from).
- Data. Swift ran the Hermes agent on each bug twice: once with no strategy, once with the strongest public strategy at the time (round r0042's revealed bundle). Only fixes the round's grader verified were kept, and disqualified or timed-out runs were dropped. Every run was recorded under the plain system prompt, so the strategy's behaviour is trained into the weights rather than prompted.
- One sample per agent turn. The agent does not send earlier reasoning back to the model, so at each step the model sees its past actions but not its past thinking. Each turn was trained in exactly that context, rendered token-for-token as the serving engine renders it, with that turn's reasoning and tool call as the target.
- Training. slime (Megatron), 2 epochs, learning rate 5e-6 cosine, 32 turns per step, on 8ร H100.
Evaluation
99 held-out bugs from the competition's own repositories (never trained on), run the way a Spark-Hermes round runs them: Hermes agent, sandboxed container, the round's grader, temperature 0.7 / top-p 0.95, no strategy. BF16 weights served with SGLang, prompts rendered as the competition engine renders them.
| Swift (base) | SparkHermes-27B-v1 | |
|---|---|---|
| Mean credit | 0.738 | 0.730 |
| Full fixes | 68 / 99 | 66 / 99 |
| Median tool calls | 16 | 15 |
| Disqualified | 0 | 0 |
Paired on the same bugs: better on 4, worse on 5, same on 90. No measurable difference in fix rate; this sample can only rule out a large change.
This NVFP4 build on an RTX 5090, served by the competition's engine (SparkInfer 0.6.5), on 100 held-out bugs against Swift's own NVFP4 build in the same setup:
| Swift NVFP4 | SparkHermes-27B-v1-NVFP4 | |
|---|---|---|
| Mean credit | 0.788 | 0.734 |
| Full fixes | 74 / 100 | 70 / 100 |
| Median tool calls | 15.5 | 16 |
| Token budget exhausted | 18 | 22 |
| Disqualified | 0 | 0 |
Paired: better on 6, worse on 11, same on 83 (sign test p โ 0.33). Not a significant difference, but the direction favours Swift: after 4-bit quantization this fine-tune is at best on par with its base, and may be slightly behind.
Quantization
Same recipe as gittensor-model-hub/Swift-Qwen3.8-27B-NVFP4-RTX5090:
NVIDIA TensorRT Model Optimizer 0.47.0, NVFP4_DEFAULT_CFG, lm_head quantized; the Gated DeltaNet
conv1d / in_proj_a / in_proj_b modules, embed_tokens and the vision tower stay in BF16. Calibration: 512 ร
2,048 tokens from wikitext and cnn_dailymail. Exclusions are written to both config.json and hf_quant_config.json.
Tokenizer: this checkpoint's tokenizer.json has no truncation. The upstream Swift NVFP4 repo's tokenizer
truncates every input to 512 tokens, which breaks any engine that applies it; this one does not.
Licence
Inherits the source's Swift Open License v1.0 (LICENSE), with Apache-2.0 terms for the Qwen base
(LICENSE-APACHE-2.0) and attribution in NOTICE. ยง5 sets a US$1,000,000 gross-revenue threshold for commercial
use; read it before deploying commercially.
- Downloads last month
- 43