File size: 1,151 Bytes
709f2bf
 
 
 
 
 
 
 
 
 
 
ccdd20a
709f2bf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ccdd20a
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Run Awkweave 0.5B with Ollama

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.

```bash
ollama create awkweave-0.5b -f Modelfile
```

Generate a program with a request and representative input:

```bash
ollama run awkweave-0.5b $'Request:\nFor each record, print column 1 and the running sum of column 2, separated by a space.\n\nSample input:\n```text\nalice 10\nbruno 15\nchen 7\n```'
```

Expected output:

```awk
{s+=$2;print $1,s}
```

The model returns a bare `awk` program. Review it before execution. To run the example with `awk` itself:

```bash
printf 'alice 10\nbruno 15\nchen 7\n' | awk '{s+=$2;print $1,s}'
```

Expected result:

```text
alice 10
bruno 25
chen 32
```

For a local HTTP API, use `llama-server` with `awkweave-0.5b.Q4_K_M.gguf` or the larger Q8_0 build. The 1.5B sibling model is more accurate on the frozen evaluation; choose based on your speed and accuracy needs.

Outputs can be sensitive to request phrasing. Prefer explicit field positions and operations, and review generated programs before execution.