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 model README
Browse files
README.md
CHANGED
|
@@ -1,81 +1,104 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
|
| 7 |
-
##
|
| 8 |
|
| 9 |
-
|
| 10 |
-
-
|
|
|
|
| 11 |
|
| 12 |
## What Is SuperMongo
|
| 13 |
|
| 14 |
-
SuperMongo is a plotting and data-analysis environment widely used in
|
| 15 |
-
|
| 16 |
-
Reference:
|
| 17 |
-
- https://www.astro.princeton.edu/~rhl/sm/
|
| 18 |
-
|
| 19 |
-
## Dataset and Scope
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
The training data emphasizes:
|
| 24 |
-
- reusable plotting macros
|
| 25 |
-
- parameterized workflow helpers
|
| 26 |
-
- practical data visualization patterns used in long-running scientific analysis
|
| 27 |
|
| 28 |
## Intended Use
|
| 29 |
|
| 30 |
-
-
|
| 31 |
-
-
|
| 32 |
-
-
|
| 33 |
|
| 34 |
-
##
|
| 35 |
|
| 36 |
-
- a general-purpose chatbot
|
| 37 |
-
- an authoritative source on non-SM domains
|
| 38 |
-
-
|
|
|
|
| 39 |
|
| 40 |
## Example Prompts
|
| 41 |
|
| 42 |
-
- "Write an SM macro
|
| 43 |
-
|
| 44 |
-
- "
|
|
|
|
|
|
|
| 45 |
|
| 46 |
-
## Example
|
| 47 |
|
| 48 |
-
The model
|
|
|
|
| 49 |
|
| 50 |
-
```
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
```
|
| 65 |
|
| 66 |
-
```
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
set _ymax = max(yv)
|
| 72 |
-
limits (_xmin-pad) (_xmax+pad) (_ymin-pad) (_ymax+pad)
|
| 73 |
-
box
|
| 74 |
-
}
|
| 75 |
```
|
| 76 |
|
| 77 |
-
##
|
| 78 |
|
| 79 |
-
-
|
| 80 |
-
- For browser usage, prefer the MLC repository.
|
| 81 |
-
- For local inference with Ollama/llama.cpp, prefer the GGUF repository.
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
base_model: Qwen/Qwen2.5-Coder-1.5B-Instruct
|
| 6 |
+
base_model_relation: finetune
|
| 7 |
+
tags:
|
| 8 |
+
- supermongo
|
| 9 |
+
- astronomy
|
| 10 |
+
- code-generation
|
| 11 |
+
- scientific-plotting
|
| 12 |
+
pipeline_tag: text-generation
|
| 13 |
+
library_name: gguf
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# SM Coder 1.5B — GGUF
|
| 17 |
+
|
| 18 |
+
A fine-tuned coding assistant for **SuperMongo (SM)** macro development,
|
| 19 |
+
packaged as a quantized GGUF file for use with [Ollama](https://ollama.com)
|
| 20 |
+
or [llama.cpp](https://github.com/ggerganov/llama.cpp).
|
| 21 |
+
|
| 22 |
+
| File | Quant | Size |
|
| 23 |
+
|------|-------|------|
|
| 24 |
+
| `sm-coder-1.5b-q4_k_m.gguf` | Q4_K_M | ~1 GB |
|
| 25 |
+
|
| 26 |
+
## Quick Start (Ollama)
|
| 27 |
+
|
| 28 |
+
```bash
|
| 29 |
+
# create the model from the bundled Modelfile
|
| 30 |
+
ollama create sm-coder -f Modelfile.finetuned
|
| 31 |
+
|
| 32 |
+
# chat
|
| 33 |
+
ollama run sm-coder "Write an SM macro to overplot error bars"
|
| 34 |
+
```
|
| 35 |
|
| 36 |
+
## Base Model
|
| 37 |
|
| 38 |
+
[Qwen/Qwen2.5-Coder-1.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B-Instruct),
|
| 39 |
+
fine-tuned on a curated dataset of SM macros and related examples collected
|
| 40 |
+
over ~20 years of real scientific usage.
|
| 41 |
|
| 42 |
## What Is SuperMongo
|
| 43 |
|
| 44 |
+
SuperMongo is a plotting and data-analysis environment widely used in
|
| 45 |
+
astronomy and scientific workflows.
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
|
| 47 |
+
Reference: <https://www.astro.princeton.edu/~rhl/sm/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
## Intended Use
|
| 50 |
|
| 51 |
+
- Writing and refactoring SuperMongo macros.
|
| 52 |
+
- Translating plotting requests into SM macro skeletons.
|
| 53 |
+
- Helping document and modernize legacy macro collections.
|
| 54 |
|
| 55 |
+
## Limitations
|
| 56 |
|
| 57 |
+
- Not a general-purpose chatbot.
|
| 58 |
+
- Not an authoritative source on non-SM domains.
|
| 59 |
+
- Always validate generated macros against your SM version and local macro
|
| 60 |
+
library before use.
|
| 61 |
|
| 62 |
## Example Prompts
|
| 63 |
|
| 64 |
+
- *"Write an SM macro that draws concentric circles given a center, starting
|
| 65 |
+
radius, step, and count."*
|
| 66 |
+
- *"Write an SM macro that reads two columns from a file and plots them with
|
| 67 |
+
auto-scaled limits."*
|
| 68 |
+
- *"Refactor this SM macro into smaller reusable helpers."*
|
| 69 |
|
| 70 |
+
## Example Output
|
| 71 |
|
| 72 |
+
The model produces macros in standard SM syntax (positional `$1 $2 …`
|
| 73 |
+
parameters, `set` for vectors, `define` for scalars):
|
| 74 |
|
| 75 |
+
```
|
| 76 |
+
draw_circle 4 ## draw a circle centred at ($1,$2) radius $3 with $4 points
|
| 77 |
+
set _th = 2*PI*indgen($4)/$4
|
| 78 |
+
set _cx = $1 + $3*COS(_th)
|
| 79 |
+
set _cy = $2 + $3*SIN(_th)
|
| 80 |
+
connect _cx _cy
|
| 81 |
+
```
|
| 82 |
|
| 83 |
+
```
|
| 84 |
+
quickplot 1 ## read two-column file $1, auto-scale, and plot
|
| 85 |
+
data $1
|
| 86 |
+
read {x 1 y 2}
|
| 87 |
+
limits x y
|
| 88 |
+
erase
|
| 89 |
+
box
|
| 90 |
+
connect x y
|
| 91 |
+
xlabel Column 1
|
| 92 |
+
ylabel Column 2
|
| 93 |
```
|
| 94 |
|
| 95 |
+
```
|
| 96 |
+
oploterr 4 ## overplot error bars on current axes for x=$1 y=$2 ey=$3
|
| 97 |
+
set _ylo = $2 - $3
|
| 98 |
+
set _yhi = $2 + $3
|
| 99 |
+
error_y $1 $2 _ylo _yhi
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
```
|
| 101 |
|
| 102 |
+
## Other Formats
|
| 103 |
|
| 104 |
+
- **MLC (WebLLM / browser):** <https://huggingface.co/xpol555/sm-coder-mlc>
|
|
|
|
|
|