xpol555 commited on
Commit
e55d982
·
verified ·
1 Parent(s): a39df67

Upload model README

Browse files
Files changed (1) hide show
  1. README.md +81 -58
README.md CHANGED
@@ -1,81 +1,104 @@
1
- # SM Coder 1.5B
2
-
3
- SM Coder is a fine-tuned coding assistant focused on SuperMongo (SM) macro development for scientific plotting workflows.
4
-
5
- This README is intended as the public model card for Hugging Face uploads.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6
 
7
- ## Model Repositories
8
 
9
- - GGUF (Ollama / llama.cpp): https://huggingface.co/xpol555/sm-coder-gguf
10
- - MLC (WebLLM / browser deployment): https://huggingface.co/xpol555/sm-coder-mlc
 
11
 
12
  ## What Is SuperMongo
13
 
14
- SuperMongo is a plotting and data-analysis environment widely used in astronomy and scientific workflows.
15
-
16
- Reference:
17
- - https://www.astro.princeton.edu/~rhl/sm/
18
-
19
- ## Dataset and Scope
20
 
21
- This model was developed on a curated dataset of SM macros and related examples collected and evolved over about 20 years of real usage.
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
- - writing and refactoring SuperMongo macros
31
- - translating plotting requests into SM macro skeletons
32
- - helping document and modernize legacy macro collections
33
 
34
- ## Not Intended As
35
 
36
- - a general-purpose chatbot
37
- - an authoritative source on non-SM domains
38
- - a replacement for validation/testing of scientific plots
 
39
 
40
  ## Example Prompts
41
 
42
- - "Write an SM macro to draw concentric circles with configurable center and step."
43
- - "Create an SM macro that computes min/max from two vectors and sets plotting limits."
44
- - "Refactor this old SM macro into smaller parameterized helpers."
 
 
45
 
46
- ## Example Macro Ideas
47
 
48
- The model can propose macro structures like these (adapt names and details to your local SM setup):
 
49
 
50
- ```sm
51
- define draw_circle (xc,yc,r,npt) {
52
- set _th = 2*3.14159265*indgen(npt)/npt
53
- set _x = xc + r*cos(_th)
54
- set _y = yc + r*sin(_th)
55
- connect _x _y
56
- }
57
 
58
- define draw_concentric (xc,yc,r0,dr,nr,npt) {
59
- do i = 0, nr-1 {
60
- set _r = r0 + i*dr
61
- draw_circle(xc,yc,_r,npt)
62
- }
63
- }
 
 
 
 
64
  ```
65
 
66
- ```sm
67
- define autoscale_xy (xv,yv,pad) {
68
- set _xmin = min(xv)
69
- set _xmax = max(xv)
70
- set _ymin = min(yv)
71
- set _ymax = max(yv)
72
- limits (_xmin-pad) (_xmax+pad) (_ymin-pad) (_ymax+pad)
73
- box
74
- }
75
  ```
76
 
77
- ## Notes
78
 
79
- - Validate generated macros against your SM version and local macro library.
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>