Text Generation
GGUF
Safetensors
English
Turkish
plc
iec-61131-3
structured-text
code-generation
ollama
mikrodev
ALB
AdvanceLogicBuilder
MikrodevLogicStudio
advance-logic-builder
mikrodev-logicstudio
gemma
conversational
Instructions to use Mikrodev/stcoder-gemma4-12b-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Mikrodev/stcoder-gemma4-12b-gguf 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 Mikrodev/stcoder-gemma4-12b-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf Mikrodev/stcoder-gemma4-12b-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Mikrodev/stcoder-gemma4-12b-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf Mikrodev/stcoder-gemma4-12b-gguf:Q4_K_M
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 Mikrodev/stcoder-gemma4-12b-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Mikrodev/stcoder-gemma4-12b-gguf:Q4_K_M
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 Mikrodev/stcoder-gemma4-12b-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Mikrodev/stcoder-gemma4-12b-gguf:Q4_K_M
Use Docker
docker model run hf.co/Mikrodev/stcoder-gemma4-12b-gguf:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Mikrodev/stcoder-gemma4-12b-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Mikrodev/stcoder-gemma4-12b-gguf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Mikrodev/stcoder-gemma4-12b-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Mikrodev/stcoder-gemma4-12b-gguf:Q4_K_M
- Ollama
How to use Mikrodev/stcoder-gemma4-12b-gguf with Ollama:
ollama run hf.co/Mikrodev/stcoder-gemma4-12b-gguf:Q4_K_M
- Unsloth Studio
How to use Mikrodev/stcoder-gemma4-12b-gguf 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 Mikrodev/stcoder-gemma4-12b-gguf 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 Mikrodev/stcoder-gemma4-12b-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Mikrodev/stcoder-gemma4-12b-gguf to start chatting
- Docker Model Runner
How to use Mikrodev/stcoder-gemma4-12b-gguf with Docker Model Runner:
docker model run hf.co/Mikrodev/stcoder-gemma4-12b-gguf:Q4_K_M
- Lemonade
How to use Mikrodev/stcoder-gemma4-12b-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Mikrodev/stcoder-gemma4-12b-gguf:Q4_K_M
Run and chat with the model
lemonade run user.stcoder-gemma4-12b-gguf-Q4_K_M
List all available models
lemonade list
- Atomic Chat
Upload Modelfile with huggingface_hub
Browse files
Modelfile
CHANGED
|
@@ -10,26 +10,22 @@
|
|
| 10 |
# 2) ollama create stcoder-gemma4-12b:<quant> -f Modelfile e.g. ollama create stcoder-gemma4-12b:q8_0 -f Modelfile
|
| 11 |
# 3) ollama run stcoder-gemma4-12b:<quant> "Motor starts 5 seconds after the start button; stop and E-stop drop it."
|
| 12 |
#
|
| 13 |
-
# Requires Ollama 0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
# num_ctx 8192 matches the sequence length this model was fine-tuned at.
|
| 15 |
# Published numbers were measured greedily (temperature 0, seed 42) at num_ctx 16384 / num_predict 8192. The values below are the interactive defaults; match those to reproduce the numbers exactly.
|
| 16 |
-
# Gemma
|
| 17 |
-
# Q8_0 crashed on a 16 GiB card in our own testing at this context size; drop to Q6_K if you hit an out-of-memory or a load failure.
|
| 18 |
# Q8_0: crashed on a 16 GiB card in our own testing at 8k context - if that happens, drop to Q6_K.
|
| 19 |
|
| 20 |
FROM ./gemma4_12b-tc.q8_0.gguf
|
| 21 |
|
| 22 |
-
TEMPLATE """<start_of_turn>user
|
| 23 |
-
{{ if .System }}{{ .System }}
|
| 24 |
-
|
| 25 |
-
{{ end }}{{ .Prompt }}<end_of_turn>
|
| 26 |
-
<start_of_turn>model
|
| 27 |
-
{{ .Response }}<end_of_turn>
|
| 28 |
-
"""
|
| 29 |
-
|
| 30 |
-
PARAMETER stop "<end_of_turn>"
|
| 31 |
-
PARAMETER stop "<start_of_turn>"
|
| 32 |
-
|
| 33 |
PARAMETER temperature 0.2
|
| 34 |
PARAMETER top_p 0.95
|
| 35 |
PARAMETER top_k 20
|
|
|
|
| 10 |
# 2) ollama create stcoder-gemma4-12b:<quant> -f Modelfile e.g. ollama create stcoder-gemma4-12b:q8_0 -f Modelfile
|
| 11 |
# 3) ollama run stcoder-gemma4-12b:<quant> "Motor starts 5 seconds after the start button; stop and E-stop drop it."
|
| 12 |
#
|
| 13 |
+
# Requires Ollama 0.32 or newer; verified on 0.32.5.
|
| 14 |
+
#
|
| 15 |
+
# No TEMPLATE line here, deliberately: Ollama uses its built-in `gemma4` renderer, which matches the chat template stored inside the GGUF
|
| 16 |
+
# - the template of the tokenizer this model was trained with, so it cannot drift out of
|
| 17 |
+
# sync with the weights. We measured this: adding a TEMPLATE to this file does not change
|
| 18 |
+
# the prompt the model receives (identical prompt token counts with, without, and with a
|
| 19 |
+
# deliberately wrong template). With llama.cpp directly, pass --jinja so llama-cli and
|
| 20 |
+
# llama-server use that same embedded template.
|
| 21 |
+
#
|
| 22 |
# num_ctx 8192 matches the sequence length this model was fine-tuned at.
|
| 23 |
# Published numbers were measured greedily (temperature 0, seed 42) at num_ctx 16384 / num_predict 8192. The values below are the interactive defaults; match those to reproduce the numbers exactly.
|
| 24 |
+
# Gemma 4 support in Ollama is recent. If `ollama create` fails on this GGUF, update Ollama before anything else.
|
|
|
|
| 25 |
# Q8_0: crashed on a 16 GiB card in our own testing at 8k context - if that happens, drop to Q6_K.
|
| 26 |
|
| 27 |
FROM ./gemma4_12b-tc.q8_0.gguf
|
| 28 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
PARAMETER temperature 0.2
|
| 30 |
PARAMETER top_p 0.95
|
| 31 |
PARAMETER top_k 20
|