asterbraid commited on
Commit
3dee8e4
·
verified ·
1 Parent(s): 8262357

Add Ollama Modelfile and local-run instructions

Browse files
Files changed (3) hide show
  1. Modelfile +5 -0
  2. OLLAMA.md +35 -0
  3. README.md +2 -0
Modelfile ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ FROM ./awkweave-1.5b.Q4_K_M.gguf
2
+ PARAMETER temperature 0
3
+ PARAMETER num_ctx 4096
4
+ PARAMETER num_predict 192
5
+ SYSTEM """You write POSIX awk programs for text-processing requests. Given a request and sample input, return only the awk program, not the awk command or Markdown. Do not read or write files, invoke commands, or explain."""
OLLAMA.md ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Run Awkweave with Ollama
2
+
3
+ The included `Modelfile` selects the Q4_K_M build, applies the required system prompt, limits the context to 4,096 tokens, and uses deterministic generation.
4
+
5
+ ```bash
6
+ ollama create awkweave -f Modelfile
7
+ ```
8
+
9
+ Generate a program by supplying a request and representative input in the same format used during training:
10
+
11
+ ```bash
12
+ ollama run awkweave $'Request:\nPrint each name and the running total of column 2.\n\nSample input:\n```text\nalice 10\nbruno 15\nchen 7\n```'
13
+ ```
14
+
15
+ Expected output:
16
+
17
+ ```awk
18
+ {s+=$2;print $1,s}
19
+ ```
20
+
21
+ The model returns a bare `awk` program, not a shell command. Review it before execution. To run that example with `awk` itself:
22
+
23
+ ```bash
24
+ printf 'alice 10\nbruno 15\nchen 7\n' | awk '{s+=$2;print $1,s}'
25
+ ```
26
+
27
+ Expected result:
28
+
29
+ ```text
30
+ alice 10
31
+ bruno 25
32
+ chen 32
33
+ ```
34
+
35
+ For a local HTTP API instead, use `llama-server` directly with `awkweave-1.5b.Q4_K_M.gguf` or the larger Q8_0 build. See the main model card for that command.
README.md CHANGED
@@ -130,6 +130,8 @@ Quantized builds are included for llama.cpp-compatible runtimes:
130
  llama-server -m awkweave-1.5b.Q8_0.gguf --host 127.0.0.1 --port 8080
131
  ```
132
 
 
 
133
  The Q4_K_M build was also loaded in `llama-completion` and passed a real generation smoke check.
134
 
135
 
 
130
  llama-server -m awkweave-1.5b.Q8_0.gguf --host 127.0.0.1 --port 8080
131
  ```
132
 
133
+ For Ollama, run `ollama create awkweave -f Modelfile` from this repository, then see `OLLAMA.md` for the exact prompt format and an executable example.
134
+
135
  The Q4_K_M build was also loaded in `llama-completion` and passed a real generation smoke check.
136
 
137