Text Generation
Transformers
Safetensors
GGUF
English
qwen2
coding
python
linux
systems-programming
embedded-systems
automotive
communication protocols
rtos/register
tool-calling
agent
128k context
C
CPP
1.5B
Microcontroller
STM32
CAN
Ethernet
Autosar
conversational
text-generation-inference
Instructions to use anyze/Ze1.5-Automotive-Embedded-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use anyze/Ze1.5-Automotive-Embedded-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="anyze/Ze1.5-Automotive-Embedded-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("anyze/Ze1.5-Automotive-Embedded-Instruct") model = AutoModelForCausalLM.from_pretrained("anyze/Ze1.5-Automotive-Embedded-Instruct", device_map="auto") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use anyze/Ze1.5-Automotive-Embedded-Instruct with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf anyze/Ze1.5-Automotive-Embedded-Instruct:F16 # Run inference directly in the terminal: llama cli -hf anyze/Ze1.5-Automotive-Embedded-Instruct:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf anyze/Ze1.5-Automotive-Embedded-Instruct:F16 # Run inference directly in the terminal: llama cli -hf anyze/Ze1.5-Automotive-Embedded-Instruct: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 anyze/Ze1.5-Automotive-Embedded-Instruct:F16 # Run inference directly in the terminal: ./llama-cli -hf anyze/Ze1.5-Automotive-Embedded-Instruct: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 anyze/Ze1.5-Automotive-Embedded-Instruct:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf anyze/Ze1.5-Automotive-Embedded-Instruct:F16
Use Docker
docker model run hf.co/anyze/Ze1.5-Automotive-Embedded-Instruct:F16
- LM Studio
- Jan
- vLLM
How to use anyze/Ze1.5-Automotive-Embedded-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "anyze/Ze1.5-Automotive-Embedded-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "anyze/Ze1.5-Automotive-Embedded-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/anyze/Ze1.5-Automotive-Embedded-Instruct:F16
- SGLang
How to use anyze/Ze1.5-Automotive-Embedded-Instruct 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 "anyze/Ze1.5-Automotive-Embedded-Instruct" \ --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": "anyze/Ze1.5-Automotive-Embedded-Instruct", "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 "anyze/Ze1.5-Automotive-Embedded-Instruct" \ --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": "anyze/Ze1.5-Automotive-Embedded-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use anyze/Ze1.5-Automotive-Embedded-Instruct with Ollama:
ollama run hf.co/anyze/Ze1.5-Automotive-Embedded-Instruct:F16
- Unsloth Desktop
- Pi
How to use anyze/Ze1.5-Automotive-Embedded-Instruct with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf anyze/Ze1.5-Automotive-Embedded-Instruct:F16
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "anyze/Ze1.5-Automotive-Embedded-Instruct:F16" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use anyze/Ze1.5-Automotive-Embedded-Instruct with Docker Model Runner:
docker model run hf.co/anyze/Ze1.5-Automotive-Embedded-Instruct:F16
- Lemonade
How to use anyze/Ze1.5-Automotive-Embedded-Instruct with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull anyze/Ze1.5-Automotive-Embedded-Instruct:F16
Run and chat with the model
lemonade run user.Ze1.5-Automotive-Embedded-Instruct-F16
List all available models
lemonade list
- Hermes Agent
How to use anyze/Ze1.5-Automotive-Embedded-Instruct with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf anyze/Ze1.5-Automotive-Embedded-Instruct: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 anyze/Ze1.5-Automotive-Embedded-Instruct:F16
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use anyze/Ze1.5-Automotive-Embedded-Instruct with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf anyze/Ze1.5-Automotive-Embedded-Instruct:F16
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "anyze/Ze1.5-Automotive-Embedded-Instruct:F16" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Add F16 GGUF + tool-aware Modelfile for local runtimes (Ollama/LM Studio/llama.cpp)
Browse files- .gitattributes +1 -0
- gguf/Modelfile +69 -0
- gguf/README.md +53 -0
- gguf/Ze1.5-1.5B-Automotive-Embedded-Instruct-F16.gguf +3 -0
.gitattributes
CHANGED
|
@@ -34,3 +34,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
gguf/Ze1.5-1.5B-Automotive-Embedded-Instruct-F16.gguf filter=lfs diff=lfs merge=lfs -text
|
gguf/Modelfile
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ./Ze1.5-1.5B-Automotive-Embedded-Instruct-F16.gguf
|
| 2 |
+
# Tool-aware ChatML template. Two reasons it must reference .Tools:
|
| 3 |
+
# 1) Ollama sets the model's "tools" capability ONLY if the template has a .Tools node — that's
|
| 4 |
+
# what makes GitHub Copilot (and other clients) show Tools / agent mode for this model.
|
| 5 |
+
# 2) When a client passes tools, they're rendered into the system `# Tools` block in the exact
|
| 6 |
+
# format this model expects.
|
| 7 |
+
# NOTE: this model emits tool calls as a ```json code block (not a special tool-call token), so the
|
| 8 |
+
# tool instruction AND the assistant .ToolCalls rendering use a ```json fence, and tool results
|
| 9 |
+
# come back as <tool_response> in a user turn.
|
| 10 |
+
TEMPLATE """{{- if .Messages }}
|
| 11 |
+
{{- if or .System .Tools }}<|im_start|>system
|
| 12 |
+
{{- if .System }}
|
| 13 |
+
{{ .System }}
|
| 14 |
+
{{- end }}
|
| 15 |
+
{{- if .Tools }}
|
| 16 |
+
|
| 17 |
+
# Tools
|
| 18 |
+
|
| 19 |
+
You may call one or more functions to assist with the user query.
|
| 20 |
+
|
| 21 |
+
You are provided with function signatures within <tools></tools> XML tags:
|
| 22 |
+
<tools>
|
| 23 |
+
{{- range .Tools }}
|
| 24 |
+
{"type": "function", "function": {{ .Function }}}
|
| 25 |
+
{{- end }}
|
| 26 |
+
</tools>
|
| 27 |
+
|
| 28 |
+
To call a function, output a ```json code block containing a JSON object with the function name and arguments, then stop:
|
| 29 |
+
```json
|
| 30 |
+
{"name": <function-name>, "arguments": <args-json-object>}
|
| 31 |
+
```
|
| 32 |
+
{{- end }}<|im_end|>
|
| 33 |
+
{{ end }}
|
| 34 |
+
{{- range $i, $_ := .Messages }}
|
| 35 |
+
{{- $last := eq (len (slice $.Messages $i)) 1 -}}
|
| 36 |
+
{{- if eq .Role "user" }}<|im_start|>user
|
| 37 |
+
{{ .Content }}<|im_end|>
|
| 38 |
+
{{ else if eq .Role "assistant" }}<|im_start|>assistant
|
| 39 |
+
{{ if .Content }}{{ .Content }}
|
| 40 |
+
{{- else if .ToolCalls }}```json
|
| 41 |
+
{{ range .ToolCalls }}{"name": "{{ .Function.Name }}", "arguments": {{ .Function.Arguments }}}
|
| 42 |
+
{{ end }}```
|
| 43 |
+
{{- end }}{{ if not $last }}<|im_end|>
|
| 44 |
+
{{ end }}
|
| 45 |
+
{{- else if eq .Role "tool" }}<|im_start|>user
|
| 46 |
+
<tool_response>
|
| 47 |
+
{{ .Content }}
|
| 48 |
+
</tool_response><|im_end|>
|
| 49 |
+
{{ end }}
|
| 50 |
+
{{- if and (ne .Role "assistant") $last }}<|im_start|>assistant
|
| 51 |
+
{{ end }}
|
| 52 |
+
{{- end }}
|
| 53 |
+
{{- else }}
|
| 54 |
+
{{- if .System }}<|im_start|>system
|
| 55 |
+
{{ .System }}<|im_end|>
|
| 56 |
+
{{ end }}{{ if .Prompt }}<|im_start|>user
|
| 57 |
+
{{ .Prompt }}<|im_end|>
|
| 58 |
+
{{ end }}<|im_start|>assistant
|
| 59 |
+
{{ end }}{{ .Response }}"""
|
| 60 |
+
SYSTEM """You are Ze1.5, an embedded-systems and automotive firmware specialist: C/C++, MCUs, RTOS, drivers/peripherals (UART/SPI/I2C/CAN/LIN/Ethernet), ISRs, UDS/OBD diagnostics, MISRA C, and AUTOSAR (Classic and Adaptive Platform). Answer precisely and, when a tool is provided and useful, call it."""
|
| 61 |
+
PARAMETER temperature 0.7
|
| 62 |
+
PARAMETER top_p 0.8
|
| 63 |
+
PARAMETER top_k 20
|
| 64 |
+
PARAMETER repeat_penalty 1.1
|
| 65 |
+
# Copilot/agent clients send large prompts (system + tool defs + file context). Default num_ctx
|
| 66 |
+
# 4096 truncates those; 16384 fits a typical agent turn on 8 GB (weights ~3GB + KV ~0.5GB).
|
| 67 |
+
PARAMETER num_ctx 16384
|
| 68 |
+
PARAMETER stop "<|im_end|>"
|
| 69 |
+
PARAMETER stop "<|im_start|>"
|
gguf/README.md
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Anyze Ze1.5 Instruct — GGUF (Ollama / LM Studio / llama.cpp)
|
| 2 |
+
|
| 3 |
+
This folder contains the model in GGUF for local runtimes:
|
| 4 |
+
|
| 5 |
+
- `Ze1.5-1.5B-Automotive-Embedded-Instruct-F16.gguf` — F16 weights (~3.1 GB).
|
| 6 |
+
- `Modelfile` — tool-aware ChatML template + default system prompt and sampling.
|
| 7 |
+
|
| 8 |
+
Ze1.5 is a 1.5B automotive/embedded specialist (C/C++, MCUs, RTOS, CAN/LIN, UDS,
|
| 9 |
+
MISRA, AUTOSAR) that also handles everyday Python, Linux/systems, and shell work,
|
| 10 |
+
with agentic tool calling. Context window 128k (YaRN); a large KV-cache needs several
|
| 11 |
+
GB, so size `num_ctx` to your hardware.
|
| 12 |
+
|
| 13 |
+
## Ollama
|
| 14 |
+
|
| 15 |
+
From this folder:
|
| 16 |
+
|
| 17 |
+
```bash
|
| 18 |
+
ollama create ze1_5-embedded -f Modelfile
|
| 19 |
+
ollama run ze1_5-embedded "Write a ring buffer in C for a UART RX ISR"
|
| 20 |
+
```
|
| 21 |
+
|
| 22 |
+
The `Modelfile` template exposes the model's **tools** capability, so agent clients
|
| 23 |
+
(e.g. GitHub Copilot) can pass tool definitions and get `json`-fenced tool calls back.
|
| 24 |
+
Override the default system prompt with `/set system "..."` in a running session.
|
| 25 |
+
|
| 26 |
+
## LM Studio
|
| 27 |
+
|
| 28 |
+
Load the GGUF directly — the ChatML chat template is embedded, so no manual
|
| 29 |
+
prompt-format setup is needed. Set the system prompt to match your task; suggested
|
| 30 |
+
sampling is `temperature 0.7, top_p 0.8, top_k 20, repeat_penalty 1.1`.
|
| 31 |
+
|
| 32 |
+
## Rebuild / quantize with llama.cpp
|
| 33 |
+
|
| 34 |
+
To regenerate the GGUF from the `../huggingface` export, or make a smaller quant:
|
| 35 |
+
|
| 36 |
+
```bash
|
| 37 |
+
git clone https://github.com/ggerganov/llama.cpp
|
| 38 |
+
pip install -r llama.cpp/requirements.txt
|
| 39 |
+
|
| 40 |
+
# F16 GGUF from the HF export
|
| 41 |
+
python llama.cpp/convert_hf_to_gguf.py ../huggingface \
|
| 42 |
+
--outfile Ze1.5-1.5B-Automotive-Embedded-Instruct-F16.gguf --outtype f16
|
| 43 |
+
|
| 44 |
+
# optional: quantize (build llama.cpp tools first)
|
| 45 |
+
./llama.cpp/build/bin/llama-quantize \
|
| 46 |
+
Ze1.5-1.5B-Automotive-Embedded-Instruct-F16.gguf \
|
| 47 |
+
Ze1.5-1.5B-Automotive-Embedded-Instruct-Q4_K_M.gguf Q4_K_M
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
Then point the `Modelfile` `FROM` at whichever GGUF you built.
|
| 51 |
+
|
| 52 |
+
Licensed under Apache-2.0 (see `../huggingface/LICENSE`). Always review generated
|
| 53 |
+
code before flashing to hardware.
|
gguf/Ze1.5-1.5B-Automotive-Embedded-Instruct-F16.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2632d19c1abeabfbf4134bc48b94f49c699988455a5e91592e2b75f5d2a44be9
|
| 3 |
+
size 3093669280
|