How to use from the
Use from the
llama-cpp-python library
# !pip install llama-cpp-python

from llama_cpp import Llama

llm = Llama.from_pretrained(
	repo_id="xpol555/sm-coder-gguf",
	filename="sm-coder-1.5b-q4_k_m.gguf",
)
llm.create_chat_completion(
	messages = [
		{
			"role": "user",
			"content": "What is the capital of France?"
		}
	]
)

SM Coder 1.5B — GGUF

A fine-tuned coding assistant for SuperMongo (SM) macro development, packaged as a quantized GGUF file for use with Ollama or llama.cpp.

File Quant Size
sm-coder-1.5b-q4_k_m.gguf Q4_K_M ~1 GB

Quick Start (Ollama)

# create the model from the bundled Modelfile
ollama create sm-coder -f Modelfile.finetuned

# chat
ollama run sm-coder "Write an SM macro to overplot error bars"

Base Model

Qwen/Qwen2.5-Coder-1.5B-Instruct, fine-tuned on a curated dataset of SM macros and related examples collected over ~20 years of real scientific usage.

What Is SuperMongo

SuperMongo is a plotting and data-analysis environment widely used in astronomy and scientific workflows.

Reference: https://www.astro.princeton.edu/~rhl/sm/

Intended Use

  • Writing and refactoring SuperMongo macros.
  • Translating plotting requests into SM macro skeletons.
  • Helping document and modernize legacy macro collections.

Limitations

  • Not a general-purpose chatbot.
  • Not an authoritative source on non-SM domains.
  • Always validate generated macros against your SM version and local macro library before use.

Example Prompts

  • "Write an SM macro that draws concentric circles given a center, starting radius, step, and count."
  • "Write an SM macro that reads two columns from a file and plots them with auto-scaled limits."
  • "Refactor this SM macro into smaller reusable helpers."

Example Output

The model produces macros in standard SM syntax (positional $1 $2 … parameters, set for vectors, define for scalars):

draw_circle 4   ## draw a circle centred at ($1,$2) radius $3 with $4 points
        set _th = 2*PI*indgen($4)/$4
        set _cx = $1 + $3*COS(_th)
        set _cy = $2 + $3*SIN(_th)
        connect _cx _cy
quickplot 1     ## read two-column file $1, auto-scale, and plot
        data $1
        read {x 1 y 2}
        limits x y
        erase
        box
        connect x y
        xlabel Column 1
        ylabel Column 2
oploterr 4      ## overplot error bars on current axes for x=$1 y=$2 ey=$3
        set _ylo = $2 - $3
        set _yhi = $2 + $3
        error_y $1 $2 _ylo _yhi

Other Formats

Downloads last month
9
GGUF
Model size
2B params
Architecture
qwen2
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for xpol555/sm-coder-gguf

Finetuned
(182)
this model