Text Generation
Safetensors
GGUF
English
gemma3_text
function-calling
tool-use
dispatcher
delia
gemma
conversational
Instructions to use devopsforflops/functiongemma-270m-delia-dispatcher with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use devopsforflops/functiongemma-270m-delia-dispatcher with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="devopsforflops/functiongemma-270m-delia-dispatcher", filename="functiongemma-270m-delia-dispatcher-f16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use devopsforflops/functiongemma-270m-delia-dispatcher with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf devopsforflops/functiongemma-270m-delia-dispatcher:F16 # Run inference directly in the terminal: llama-cli -hf devopsforflops/functiongemma-270m-delia-dispatcher:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf devopsforflops/functiongemma-270m-delia-dispatcher:F16 # Run inference directly in the terminal: llama-cli -hf devopsforflops/functiongemma-270m-delia-dispatcher:F16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf devopsforflops/functiongemma-270m-delia-dispatcher:F16 # Run inference directly in the terminal: ./llama-cli -hf devopsforflops/functiongemma-270m-delia-dispatcher:F16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf devopsforflops/functiongemma-270m-delia-dispatcher:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf devopsforflops/functiongemma-270m-delia-dispatcher:F16
Use Docker
docker model run hf.co/devopsforflops/functiongemma-270m-delia-dispatcher:F16
- LM Studio
- Jan
- vLLM
How to use devopsforflops/functiongemma-270m-delia-dispatcher with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "devopsforflops/functiongemma-270m-delia-dispatcher" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "devopsforflops/functiongemma-270m-delia-dispatcher", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/devopsforflops/functiongemma-270m-delia-dispatcher:F16
- Ollama
How to use devopsforflops/functiongemma-270m-delia-dispatcher with Ollama:
ollama run hf.co/devopsforflops/functiongemma-270m-delia-dispatcher:F16
- Unsloth Studio new
How to use devopsforflops/functiongemma-270m-delia-dispatcher with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for devopsforflops/functiongemma-270m-delia-dispatcher to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for devopsforflops/functiongemma-270m-delia-dispatcher to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for devopsforflops/functiongemma-270m-delia-dispatcher to start chatting
- Pi new
How to use devopsforflops/functiongemma-270m-delia-dispatcher with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf devopsforflops/functiongemma-270m-delia-dispatcher:F16
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "devopsforflops/functiongemma-270m-delia-dispatcher:F16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use devopsforflops/functiongemma-270m-delia-dispatcher with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf devopsforflops/functiongemma-270m-delia-dispatcher:F16
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default devopsforflops/functiongemma-270m-delia-dispatcher:F16
Run Hermes
hermes
- Docker Model Runner
How to use devopsforflops/functiongemma-270m-delia-dispatcher with Docker Model Runner:
docker model run hf.co/devopsforflops/functiongemma-270m-delia-dispatcher:F16
- Lemonade
How to use devopsforflops/functiongemma-270m-delia-dispatcher with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull devopsforflops/functiongemma-270m-delia-dispatcher:F16
Run and chat with the model
lemonade run user.functiongemma-270m-delia-dispatcher-F16
List all available models
lemonade list
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,104 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
base_model: google/functiongemma-270m-it
|
| 4 |
+
tags:
|
| 5 |
+
- function-calling
|
| 6 |
+
- tool-use
|
| 7 |
+
- dispatcher
|
| 8 |
+
- delia
|
| 9 |
+
- gemma
|
| 10 |
+
language:
|
| 11 |
+
- en
|
| 12 |
+
pipeline_tag: text-generation
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# FunctionGemma 270M - Delia Dispatcher
|
| 16 |
+
|
| 17 |
+
A fine-tuned version of [google/functiongemma-270m-it](https://huggingface.co/google/functiongemma-270m-it) for **Delia LLM orchestration**.
|
| 18 |
+
|
| 19 |
+
This tiny model (270M params) acts as a fast dispatcher, routing user requests to the appropriate backend:
|
| 20 |
+
- `call_coder` - Code generation tasks
|
| 21 |
+
- `call_reviewer` - Code review and analysis
|
| 22 |
+
- `call_planner` - Architecture and planning (also handles ambiguous requests)
|
| 23 |
+
- `call_executor` - Running commands and scripts
|
| 24 |
+
|
| 25 |
+
## Key Features
|
| 26 |
+
|
| 27 |
+
- **Minimalist schema**: Single `reasoning` parameter per tool
|
| 28 |
+
- **Thought tokens**: Brief CoT scratchpad before tool calls
|
| 29 |
+
- **EOS hardening**: Explicit stop tokens prevent infinite loops
|
| 30 |
+
- **Negative samples**: 13% ambiguous examples → planner (graceful handling)
|
| 31 |
+
- **GBNF grammar**: Constrained decoding for 100% valid output
|
| 32 |
+
|
| 33 |
+
## Usage
|
| 34 |
+
|
| 35 |
+
### With llama.cpp (recommended for speed)
|
| 36 |
+
|
| 37 |
+
```bash
|
| 38 |
+
# Download the GGUF
|
| 39 |
+
wget https://huggingface.co/devopsforflops/functiongemma-270m-delia-dispatcher/resolve/main/functiongemma-270m-delia-dispatcher-f16.gguf
|
| 40 |
+
|
| 41 |
+
# Download the grammar
|
| 42 |
+
wget https://huggingface.co/devopsforflops/functiongemma-270m-delia-dispatcher/resolve/main/dispatcher.gbnf
|
| 43 |
+
|
| 44 |
+
# Run with grammar constraint
|
| 45 |
+
./llama-cli -m functiongemma-270m-delia-dispatcher-f16.gguf \
|
| 46 |
+
--grammar-file dispatcher.gbnf \
|
| 47 |
+
-p "<start_of_turn>user
|
| 48 |
+
Write a fibonacci function<end_of_turn>
|
| 49 |
+
<start_of_turn>model"
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
### With Transformers
|
| 53 |
+
|
| 54 |
+
```python
|
| 55 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 56 |
+
|
| 57 |
+
model = AutoModelForCausalLM.from_pretrained("devopsforflops/functiongemma-270m-delia-dispatcher")
|
| 58 |
+
tokenizer = AutoTokenizer.from_pretrained("devopsforflops/functiongemma-270m-delia-dispatcher")
|
| 59 |
+
|
| 60 |
+
prompt = """<start_of_turn>user
|
| 61 |
+
Review this code for bugs<end_of_turn>
|
| 62 |
+
<start_of_turn>model"""
|
| 63 |
+
|
| 64 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
| 65 |
+
outputs = model.generate(**inputs, max_new_tokens=100)
|
| 66 |
+
print(tokenizer.decode(outputs[0]))
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
## Output Format
|
| 70 |
+
|
| 71 |
+
```
|
| 72 |
+
<start_of_turn>user
|
| 73 |
+
{request}<end_of_turn>
|
| 74 |
+
<start_of_turn>model
|
| 75 |
+
thought
|
| 76 |
+
{brief reasoning}
|
| 77 |
+
<tool_call>{"name": "call_X", "arguments": {"reasoning": "..."}}</tool_call><end_of_turn>
|
| 78 |
+
```
|
| 79 |
+
|
| 80 |
+
## Training
|
| 81 |
+
|
| 82 |
+
Fine-tuned with [Unsloth](https://github.com/unslothai/unsloth) using LoRA:
|
| 83 |
+
- **Epochs**: 3
|
| 84 |
+
- **LoRA rank**: 32
|
| 85 |
+
- **Training examples**: 92 (balanced across 4 tools + 13% ambiguous)
|
| 86 |
+
- **Final loss**: 0.46
|
| 87 |
+
|
| 88 |
+
## Files
|
| 89 |
+
|
| 90 |
+
| File | Description |
|
| 91 |
+
|------|-------------|
|
| 92 |
+
| `functiongemma-270m-delia-dispatcher-f16.gguf` | GGUF model (F16, 518MB) |
|
| 93 |
+
| `model.safetensors` | Transformers model |
|
| 94 |
+
| `dispatcher.gbnf` | GBNF grammar for constrained decoding |
|
| 95 |
+
| `dispatcher_tools.json` | Tool schema (4 tools) |
|
| 96 |
+
| `train.jsonl` | Training data |
|
| 97 |
+
|
| 98 |
+
## License
|
| 99 |
+
|
| 100 |
+
Apache 2.0 (same as base model)
|
| 101 |
+
|
| 102 |
+
## Part of Delia
|
| 103 |
+
|
| 104 |
+
This model is designed for use with [Delia](https://github.com/zbrdc/delia), an LLM orchestration system that routes requests to optimal backends.
|