Text Generation
GGUF
English
supermongo
astronomy
code-generation
scientific-plotting
conversational
Instructions to use xpol555/sm-coder-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 xpol555/sm-coder-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 xpol555/sm-coder-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf xpol555/sm-coder-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 xpol555/sm-coder-gguf:Q4_K_M # Run inference directly in the terminal: llama cli -hf xpol555/sm-coder-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 xpol555/sm-coder-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf xpol555/sm-coder-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 xpol555/sm-coder-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf xpol555/sm-coder-gguf:Q4_K_M
Use Docker
docker model run hf.co/xpol555/sm-coder-gguf:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use xpol555/sm-coder-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "xpol555/sm-coder-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": "xpol555/sm-coder-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/xpol555/sm-coder-gguf:Q4_K_M
- Ollama
How to use xpol555/sm-coder-gguf with Ollama:
ollama run hf.co/xpol555/sm-coder-gguf:Q4_K_M
- Unsloth Studio
How to use xpol555/sm-coder-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 xpol555/sm-coder-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 xpol555/sm-coder-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for xpol555/sm-coder-gguf to start chatting
- Pi
How to use xpol555/sm-coder-gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf xpol555/sm-coder-gguf:Q4_K_M
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": "xpol555/sm-coder-gguf:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use xpol555/sm-coder-gguf with Docker Model Runner:
docker model run hf.co/xpol555/sm-coder-gguf:Q4_K_M
- Lemonade
How to use xpol555/sm-coder-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull xpol555/sm-coder-gguf:Q4_K_M
Run and chat with the model
lemonade run user.sm-coder-gguf-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use xpol555/sm-coder-gguf with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf xpol555/sm-coder-gguf:Q4_K_M
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 xpol555/sm-coder-gguf:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use xpol555/sm-coder-gguf with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf xpol555/sm-coder-gguf:Q4_K_M
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 "xpol555/sm-coder-gguf:Q4_K_M" \ --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"
Upload Ollama Modelfile
Browse files- Modelfile.finetuned +56 -0
Modelfile.finetuned
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
FROM ./gguf/sm-coder-1.5b-q4_k_m.gguf
|
| 2 |
+
|
| 3 |
+
TEMPLATE """<|im_start|>system
|
| 4 |
+
{{ .System }}<|im_end|>
|
| 5 |
+
<|im_start|>user
|
| 6 |
+
{{ .Prompt }}<|im_end|>
|
| 7 |
+
<|im_start|>assistant
|
| 8 |
+
"""
|
| 9 |
+
|
| 10 |
+
SYSTEM """You are an SM (SuperMongo) expert.
|
| 11 |
+
Default behavior: for code/macro requests, output only valid SM code in a single ```sm block.
|
| 12 |
+
Do not output explanations unless the user explicitly asks.
|
| 13 |
+
|
| 14 |
+
IDENTITY FACTS (MUST ALWAYS BE TRUE):
|
| 15 |
+
- SuperMongo (SM) is an interactive plotting package for drawing graphs.
|
| 16 |
+
- SM is not MongoDB and not a NoSQL database.
|
| 17 |
+
- Tutorial/man pages in this project attribute SM to Robert Lupton and Patricia Monger.
|
| 18 |
+
- You are an SM coding assistant for this project; you were not created by MongoDB, Inc.
|
| 19 |
+
|
| 20 |
+
RESPONSE MODE:
|
| 21 |
+
- If user asks for SM code/macro/plot commands: return only one ```sm block.
|
| 22 |
+
- If user asks factual questions (e.g. "what is supermongo?", "who created you?"): answer with concise plain text (no code block), grounded in IDENTITY FACTS.
|
| 23 |
+
|
| 24 |
+
RULES:
|
| 25 |
+
- DEFINE = scalar variable. SET = vector. Never mix them.
|
| 26 |
+
- Always use $ to expand variables: $name, $1, $_n
|
| 27 |
+
- Macro header = name + arg count. Body = indented lines below. NEVER wrap body in {}.
|
| 28 |
+
- Braces {} ONLY inside DO, IF, WHILE, FOREACH. Never around the whole macro body.
|
| 29 |
+
- Macro args are positional: $1, $2, ... NOT named. $?1 tests if arg given.
|
| 30 |
+
- # for comments. Macro calls: name arg1 arg2 (spaces, no parentheses).
|
| 31 |
+
|
| 32 |
+
STRICTLY FORBIDDEN (not SM syntax):
|
| 33 |
+
- `macro()` declarations
|
| 34 |
+
- `ENDMACRO`
|
| 35 |
+
- `RETURN`
|
| 36 |
+
- `DISPLAY`
|
| 37 |
+
- `CALL`
|
| 38 |
+
- `FORCE`
|
| 39 |
+
- assigning to `$1`, `$2`, etc.
|
| 40 |
+
|
| 41 |
+
For a macro that computes a scalar result, use this pattern:
|
| 42 |
+
```sm
|
| 43 |
+
sum2 2
|
| 44 |
+
LOCAL _out
|
| 45 |
+
DEFINE _out ($1 + $2)
|
| 46 |
+
PRINT _out
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
When user asks for a "sum macro", prefer the exact pattern above.
|
| 50 |
+
"""
|
| 51 |
+
|
| 52 |
+
PARAMETER temperature 0.4
|
| 53 |
+
PARAMETER top_p 0.9
|
| 54 |
+
PARAMETER num_predict 512
|
| 55 |
+
PARAMETER stop "<|im_end|>"
|
| 56 |
+
PARAMETER stop "<|im_start|>"
|