Text Generation
Transformers
Safetensors
GGUF
English
qwen2
awk
code-generation
text-to-code
qwen
local
small-model
execution-verified
conversational
text-generation-inference
Instructions to use asterbraid/awkweave-0.5b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use asterbraid/awkweave-0.5b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="asterbraid/awkweave-0.5b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("asterbraid/awkweave-0.5b") model = AutoModelForCausalLM.from_pretrained("asterbraid/awkweave-0.5b", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use asterbraid/awkweave-0.5b 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 asterbraid/awkweave-0.5b:Q4_K_M # Run inference directly in the terminal: llama cli -hf asterbraid/awkweave-0.5b:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf asterbraid/awkweave-0.5b:Q4_K_M # Run inference directly in the terminal: llama cli -hf asterbraid/awkweave-0.5b:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf asterbraid/awkweave-0.5b:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf asterbraid/awkweave-0.5b:Q4_K_M
Use Docker
docker model run hf.co/asterbraid/awkweave-0.5b:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use asterbraid/awkweave-0.5b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "asterbraid/awkweave-0.5b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "asterbraid/awkweave-0.5b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/asterbraid/awkweave-0.5b:Q4_K_M
- SGLang
How to use asterbraid/awkweave-0.5b with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "asterbraid/awkweave-0.5b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "asterbraid/awkweave-0.5b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "asterbraid/awkweave-0.5b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "asterbraid/awkweave-0.5b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use asterbraid/awkweave-0.5b with Ollama:
ollama run hf.co/asterbraid/awkweave-0.5b:Q4_K_M
- Unsloth Desktop
- Pi
How to use asterbraid/awkweave-0.5b with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf asterbraid/awkweave-0.5b:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "asterbraid/awkweave-0.5b:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use asterbraid/awkweave-0.5b with Docker Model Runner:
docker model run hf.co/asterbraid/awkweave-0.5b:Q4_K_M
- Lemonade
How to use asterbraid/awkweave-0.5b with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull asterbraid/awkweave-0.5b:Q4_K_M
Run and chat with the model
lemonade run user.awkweave-0.5b-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use asterbraid/awkweave-0.5b with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf asterbraid/awkweave-0.5b: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:9931/v1 hermes config set model.default asterbraid/awkweave-0.5b:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use asterbraid/awkweave-0.5b with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf asterbraid/awkweave-0.5b: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:9931/v1 \ --custom-model-id "asterbraid/awkweave-0.5b: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"
Awkweave 0.5B: low-memory offline natural-language-to-awk with GGUF and Ollama support
709f2bf verified Download evaluation/challenge.jsonl from asterbraid/awkweave-0.5b: direct link, hf CLI and curl.
- Browser
- Download file 30.7 kB
-
https://huggingface.co/asterbraid/awkweave-0.5b/resolve/main/evaluation/challenge.jsonl
- Command line
-
hf download hf://asterbraid/awkweave-0.5b/evaluation/challenge.jsonl
-
curl -L -o challenge.jsonl https://huggingface.co/asterbraid/awkweave-0.5b/resolve/main/evaluation/challenge.jsonl
30.7 kB
| {"id":"awkweave-challenge-0001","request":"Count server-error responses with HTTP status from 500 through 599; print 0 when none occur.","program":"$9 >= 500 && $9 < 600{n++}END{print n+0}","input_text":"192.0.2.10 - - [28/Nov/2026:10:00:00 +0000] \"GET /index.html HTTP/1.1\" 200 512\n192.0.2.11 - - [28/Nov/2026:10:00:01 +0000] \"POST /api/orders HTTP/1.1\" 201 128\n192.0.2.10 - - [28/Nov/2026:10:00:02 +0000] \"GET /missing HTTP/1.1\" 404 64\n192.0.2.12 - - [28/Nov/2026:10:00:03 +0000] \"GET /api/orders HTTP/1.1\" 500 32\n192.0.2.13 - - [28/Nov/2026:10:00:04 +0000] \"GET /index.html HTTP/1.1\" 200 256\n","expected_output":"1\n","validation_input":"198.51.100.20 - - [28/Nov/2026:11:00:00 +0000] \"GET /health HTTP/1.1\" 200 10\n198.51.100.21 - - [28/Nov/2026:11:00:01 +0000] \"GET /api/items HTTP/1.1\" 503 0\n198.51.100.20 - - [28/Nov/2026:11:00:02 +0000] \"POST /api/items HTTP/1.1\" 201 99\n198.51.100.22 - - [28/Nov/2026:11:00:03 +0000] \"GET /health HTTP/1.1\" 200 20\n","validation_output":"1\n","family":"http_5xx_count","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"$9>=500&&$9<=599{n++}END{print n+0}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0002","request":"What is the total number of response bytes? Sum the final field and print one integer.","program":"{bytes+=$NF}END{print bytes+0}","input_text":"192.0.2.10 - - [28/Nov/2026:10:00:00 +0000] \"GET /index.html HTTP/1.1\" 200 512\n192.0.2.11 - - [28/Nov/2026:10:00:01 +0000] \"POST /api/orders HTTP/1.1\" 201 128\n192.0.2.10 - - [28/Nov/2026:10:00:02 +0000] \"GET /missing HTTP/1.1\" 404 64\n192.0.2.12 - - [28/Nov/2026:10:00:03 +0000] \"GET /api/orders HTTP/1.1\" 500 32\n192.0.2.13 - - [28/Nov/2026:10:00:04 +0000] \"GET /index.html HTTP/1.1\" 200 256\n","expected_output":"992\n","validation_input":"198.51.100.20 - - [28/Nov/2026:11:00:00 +0000] \"GET /health HTTP/1.1\" 200 10\n198.51.100.21 - - [28/Nov/2026:11:00:01 +0000] \"GET /api/items HTTP/1.1\" 503 0\n198.51.100.20 - - [28/Nov/2026:11:00:02 +0000] \"POST /api/items HTTP/1.1\" 201 99\n198.51.100.22 - - [28/Nov/2026:11:00:03 +0000] \"GET /health HTTP/1.1\" 200 20\n","validation_output":"129\n","family":"http_bytes_sum","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"{s+=$NF}END{print s+0}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0003","request":"Count distinct client IP addresses, which appear in field 1.","program":"{if(!seen[$1]++)n++}END{print n+0}","input_text":"192.0.2.10 - - [28/Nov/2026:10:00:00 +0000] \"GET /index.html HTTP/1.1\" 200 512\n192.0.2.11 - - [28/Nov/2026:10:00:01 +0000] \"POST /api/orders HTTP/1.1\" 201 128\n192.0.2.10 - - [28/Nov/2026:10:00:02 +0000] \"GET /missing HTTP/1.1\" 404 64\n192.0.2.12 - - [28/Nov/2026:10:00:03 +0000] \"GET /api/orders HTTP/1.1\" 500 32\n192.0.2.13 - - [28/Nov/2026:10:00:04 +0000] \"GET /index.html HTTP/1.1\" 200 256\n","expected_output":"4\n","validation_input":"198.51.100.20 - - [28/Nov/2026:11:00:00 +0000] \"GET /health HTTP/1.1\" 200 10\n198.51.100.21 - - [28/Nov/2026:11:00:01 +0000] \"GET /api/items HTTP/1.1\" 503 0\n198.51.100.20 - - [28/Nov/2026:11:00:02 +0000] \"POST /api/items HTTP/1.1\" 201 99\n198.51.100.22 - - [28/Nov/2026:11:00:03 +0000] \"GET /health HTTP/1.1\" 200 20\n","validation_output":"3\n","family":"http_unique_clients","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"{if(!seen[$1]++)n++}END{print n+0}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0004","request":"Print the request path (field 7) for API routes with a 500 response.","program":"$7 ~ /^\\/api\\// && $9 == 500{print $7}","input_text":"192.0.2.10 - - [28/Nov/2026:10:00:00 +0000] \"GET /index.html HTTP/1.1\" 200 512\n192.0.2.11 - - [28/Nov/2026:10:00:01 +0000] \"POST /api/orders HTTP/1.1\" 201 128\n192.0.2.10 - - [28/Nov/2026:10:00:02 +0000] \"GET /missing HTTP/1.1\" 404 64\n192.0.2.12 - - [28/Nov/2026:10:00:03 +0000] \"GET /api/orders HTTP/1.1\" 500 32\n192.0.2.13 - - [28/Nov/2026:10:00:04 +0000] \"GET /index.html HTTP/1.1\" 200 256\n","expected_output":"/api/orders\n","validation_input":"198.51.100.20 - - [28/Nov/2026:11:00:00 +0000] \"GET /health HTTP/1.1\" 200 10\n198.51.100.21 - - [28/Nov/2026:11:00:01 +0000] \"GET /api/items HTTP/1.1\" 503 0\n198.51.100.20 - - [28/Nov/2026:11:00:02 +0000] \"POST /api/items HTTP/1.1\" 201 99\n198.51.100.22 - - [28/Nov/2026:11:00:03 +0000] \"GET /health HTTP/1.1\" 200 20\n","validation_output":"","family":"http_api_errors","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"$7>=500","valid":true,"correct":false,"error":null} | |
| {"id":"awkweave-challenge-0005","request":"For responses with status 200 only, print the average number of bytes to two decimal places.","program":"$9==200{bytes+=$10;n++}END{printf \"%.2f\\n\",bytes/n}","input_text":"192.0.2.10 - - [28/Nov/2026:10:00:00 +0000] \"GET /index.html HTTP/1.1\" 200 512\n192.0.2.11 - - [28/Nov/2026:10:00:01 +0000] \"POST /api/orders HTTP/1.1\" 201 128\n192.0.2.10 - - [28/Nov/2026:10:00:02 +0000] \"GET /missing HTTP/1.1\" 404 64\n192.0.2.12 - - [28/Nov/2026:10:00:03 +0000] \"GET /api/orders HTTP/1.1\" 500 32\n192.0.2.13 - - [28/Nov/2026:10:00:04 +0000] \"GET /index.html HTTP/1.1\" 200 256\n","expected_output":"384.00\n","validation_input":"198.51.100.20 - - [28/Nov/2026:11:00:00 +0000] \"GET /health HTTP/1.1\" 200 10\n198.51.100.21 - - [28/Nov/2026:11:00:01 +0000] \"GET /api/items HTTP/1.1\" 503 0\n198.51.100.20 - - [28/Nov/2026:11:00:02 +0000] \"POST /api/items HTTP/1.1\" 201 99\n198.51.100.22 - - [28/Nov/2026:11:00:03 +0000] \"GET /health HTTP/1.1\" 200 20\n","validation_output":"15.00\n","family":"http_success_bytes","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"$9==200{s+=$10;n++}END{printf \"%.2f\\n\",s/n}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0006","request":"Print complete request records for methods other than GET.","program":"$6 !~ /^\"GET$/{print $0}","input_text":"192.0.2.10 - - [28/Nov/2026:10:00:00 +0000] \"GET /index.html HTTP/1.1\" 200 512\n192.0.2.11 - - [28/Nov/2026:10:00:01 +0000] \"POST /api/orders HTTP/1.1\" 201 128\n192.0.2.10 - - [28/Nov/2026:10:00:02 +0000] \"GET /missing HTTP/1.1\" 404 64\n192.0.2.12 - - [28/Nov/2026:10:00:03 +0000] \"GET /api/orders HTTP/1.1\" 500 32\n192.0.2.13 - - [28/Nov/2026:10:00:04 +0000] \"GET /index.html HTTP/1.1\" 200 256\n","expected_output":"192.0.2.11 - - [28/Nov/2026:10:00:01 +0000] \"POST /api/orders HTTP/1.1\" 201 128\n","validation_input":"198.51.100.20 - - [28/Nov/2026:11:00:00 +0000] \"GET /health HTTP/1.1\" 200 10\n198.51.100.21 - - [28/Nov/2026:11:00:01 +0000] \"GET /api/items HTTP/1.1\" 503 0\n198.51.100.20 - - [28/Nov/2026:11:00:02 +0000] \"POST /api/items HTTP/1.1\" 201 99\n198.51.100.22 - - [28/Nov/2026:11:00:03 +0000] \"GET /health HTTP/1.1\" 200 20\n","validation_output":"198.51.100.20 - - [28/Nov/2026:11:00:02 +0000] \"POST /api/items HTTP/1.1\" 201 99\n","family":"http_non_get","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"$6 != \"GET\"","valid":true,"correct":false,"error":null} | |
| {"id":"awkweave-challenge-0007","request":"Count each request path from field 7 and print path then count in first-appearance order.","program":"{if(!($7 in counts))order[++n]=$7;counts[$7]++}END{for(i=1;i<=n;i++)print order[i],counts[order[i]]}","input_text":"192.0.2.10 - - [28/Nov/2026:10:00:00 +0000] \"GET /index.html HTTP/1.1\" 200 512\n192.0.2.11 - - [28/Nov/2026:10:00:01 +0000] \"POST /api/orders HTTP/1.1\" 201 128\n192.0.2.10 - - [28/Nov/2026:10:00:02 +0000] \"GET /missing HTTP/1.1\" 404 64\n192.0.2.12 - - [28/Nov/2026:10:00:03 +0000] \"GET /api/orders HTTP/1.1\" 500 32\n192.0.2.13 - - [28/Nov/2026:10:00:04 +0000] \"GET /index.html HTTP/1.1\" 200 256\n","expected_output":"/index.html 2\n/api/orders 2\n/missing 1\n","validation_input":"198.51.100.20 - - [28/Nov/2026:11:00:00 +0000] \"GET /health HTTP/1.1\" 200 10\n198.51.100.21 - - [28/Nov/2026:11:00:01 +0000] \"GET /api/items HTTP/1.1\" 503 0\n198.51.100.20 - - [28/Nov/2026:11:00:02 +0000] \"POST /api/items HTTP/1.1\" 201 99\n198.51.100.22 - - [28/Nov/2026:11:00:03 +0000] \"GET /health HTTP/1.1\" 200 20\n","validation_output":"/health 2\n/api/items 2\n","family":"http_url_counts","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"{if(!($7 in counts))order[++n]=$7;counts[$7]++}END{for(i=1;i<=n;i++)print order[i],counts[order[i]]}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0008","request":"Use the header to find the region and amount columns. Print total paid amount per region in first-appearance order.","program":"NR==1{for(i=1;i<=NF;i++)h[$i]=i;next}$h[\"status\"]==\"paid\"{key=$h[\"region\"];if(!(key in sums))order[++n]=key;sums[key]+=$h[\"amount\"]}END{for(i=1;i<=n;i++)print order[i],sums[order[i]]}","input_text":"order_id region amount status\nr001 east 12.50 paid\nr002 west 20.00 pending\nr003 east 7.50 paid\nr004 north 10.00 paid\nr005 west 5.00 paid\n","expected_output":"east 20\nnorth 10\nwest 5\n","validation_input":"order_id region amount status\nr101 south 8.00 paid\nr102 east 14.00 paid\nr103 south 6.00 pending\nr104 west 22.00 paid\n","validation_output":"south 8\neast 14\nwest 22\n","family":"header_region_totals","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"NR==1{for(i=1;i<=NF;i++)h[$i]=i;next}{key=$h[\"region\"];if(!(key in sums))order[++n]=key;sums[key]+=$h[\"amount\"]}END{for(i=1;i<=n;i++)print order[i],sums[order[i]]}","valid":true,"correct":false,"error":null} | |
| {"id":"awkweave-challenge-0009","request":"The first line is a header. Print order_id values for pending orders only.","program":"NR==1{for(i=1;i<=NF;i++)h[$i]=i;next}$h[\"status\"]==\"pending\"{print $h[\"order_id\"]}","input_text":"order_id region amount status\nr001 east 12.50 paid\nr002 west 20.00 pending\nr003 east 7.50 paid\nr004 north 10.00 paid\nr005 west 5.00 paid\n","expected_output":"r002\n","validation_input":"order_id region amount status\nr101 south 8.00 paid\nr102 east 14.00 paid\nr103 south 6.00 pending\nr104 west 22.00 paid\n","validation_output":"r103\n","family":"header_pending_ids","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"NR==1{for(i=1;i<=NF;i++)h[$i]=i;next}$h[\"status\"]==\"pending\"{print $h[\"order_id\"]}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0010","request":"Read the amount column by its header name and print its mean over all data rows to two decimal places.","program":"NR==1{for(i=1;i<=NF;i++)h[$i]=i;next}{s+=$h[\"amount\"];n++}END{printf \"%.2f\\n\",s/n}","input_text":"order_id region amount status\nr001 east 12.50 paid\nr002 west 20.00 pending\nr003 east 7.50 paid\nr004 north 10.00 paid\nr005 west 5.00 paid\n","expected_output":"11.00\n","validation_input":"order_id region amount status\nr101 south 8.00 paid\nr102 east 14.00 paid\nr103 south 6.00 pending\nr104 west 22.00 paid\n","validation_output":"12.50\n","family":"header_amount_average","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"NR==1{for(i=1;i<=NF;i++)h[$i]=i;next}{s+=$h[\"amount\"];n++}END{printf \"%.2f\\n\",s/n}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0011","request":"The first row is a header. Print the two complete orders with the largest amounts, highest first. Keep file order for ties.","program":"NR==1{next}{n++;v[n]=$3+0;line[n]=$0}END{for(i=2;i<=n;i++){x=v[i];s=line[i];j=i-1;while(j>=1&&v[j]<x){v[j+1]=v[j];line[j+1]=line[j];j--}v[j+1]=x;line[j+1]=s}for(i=1;i<=2&&i<=n;i++)print line[i]}","input_text":"order_id region amount status\nr001 east 12.50 paid\nr002 west 20.00 pending\nr003 east 7.50 paid\nr004 north 10.00 paid\nr005 west 5.00 paid\n","expected_output":"r002 west 20.00 pending\nr001 east 12.50 paid\n","validation_input":"order_id region amount status\nr101 south 8.00 paid\nr102 east 14.00 paid\nr103 south 6.00 pending\nr104 west 22.00 paid\n","validation_output":"r104 west 22.00 paid\nr102 east 14.00 paid\n","family":"top_two_amounts","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"NR==1{for(i=1;i<=NF;i++)h[$i]=i;next}{n++;v[n]=$h[\"amount\"]+0;line[n]=$0}END{for(i=2;i<=n;i++){x=v[i];s=line[i];j=i-1;while(j>=1&&v[j]<x){v[j+1]=v[j];line[j+1]=line[j];j--}v[j+1]=x;line[j+1]=s}for(i=1;i<=2&&i<=n;i++)print line[i]}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0012","request":"The first row is a header. Print each region and its average order amount to two decimals, grouping in first-appearance order and including every status.","program":"NR==1{next}{if(!($2 in sums))order[++n]=$2;sums[$2]+=$3;counts[$2]++}END{for(i=1;i<=n;i++)printf \"%s %.2f\\n\",order[i],sums[order[i]]/counts[order[i]]}","input_text":"order_id region amount status\nr001 east 12.50 paid\nr002 west 20.00 pending\nr003 east 7.50 paid\nr004 north 10.00 paid\nr005 west 5.00 paid\n","expected_output":"east 10.00\nwest 12.50\nnorth 10.00\n","validation_input":"order_id region amount status\nr101 south 8.00 paid\nr102 east 14.00 paid\nr103 south 6.00 pending\nr104 west 22.00 paid\n","validation_output":"south 7.00\neast 14.00\nwest 22.00\n","family":"region_average","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"NR==1{for(i=1;i<=NF;i++)h[$i]=i;next}{key=$h[\"region\"];if(!(key in sums))order[++n]=key;sums[key]+=$h[\"amount\"];counts[key]++}END{for(i=1;i<=n;i++)printf \"%s %.2f\\n\",order[i],sums[order[i]]/counts[order[i]]}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0013","request":"The first row is a header. For every order, print order_id and its amount as a percentage of the grand total, with two decimals and a percent sign.","program":"NR==1{next}{n++;id[n]=$1;v[n]=$3;total+=$3}END{for(i=1;i<=n;i++)printf \"%s %.2f%%\\n\",id[i],100*v[i]/total}","input_text":"order_id region amount status\nr001 east 12.50 paid\nr002 west 20.00 pending\nr003 east 7.50 paid\nr004 north 10.00 paid\nr005 west 5.00 paid\n","expected_output":"r001 22.73%\nr002 36.36%\nr003 13.64%\nr004 18.18%\nr005 9.09%\n","validation_input":"order_id region amount status\nr101 south 8.00 paid\nr102 east 14.00 paid\nr103 south 6.00 pending\nr104 west 22.00 paid\n","validation_output":"r101 16.00%\nr102 28.00%\nr103 12.00%\nr104 44.00%\n","family":"amount_percentage","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"NR==1{for(i=1;i<=NF;i++)h[$i]=i;next}{n++;id[n]=$h[\"order_id\"];v[n]=$h[\"amount\"];total+=$h[\"amount\"]}END{for(i=1;i<=n;i++)printf \"%s %.2f%%\\n\",id[i],100*v[i]/total}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0014","request":"This is colon-delimited passwd data. Print usernames whose login shell is /bin/bash.","program":"BEGIN{FS=\":\"}$7==\"/bin/bash\"{print $1}","input_text":"root:x:0:0:root:/root:/bin/bash\ndaemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin\nalice:x:1000:1000:Alice:/home/alice:/bin/bash\nbruno:x:1001:1001:Bruno:/home/bruno:/bin/zsh\nchen:x:1002:1002:Chen:/home/chen:/bin/bash\n","expected_output":"root\nalice\nchen\n","validation_input":"root:x:0:0:root:/root:/bin/bash\ndina:x:1000:1000:Dina:/home/dina:/bin/sh\neli:x:1001:1001:Eli:/home/eli:/bin/bash\n","validation_output":"root\neli\n","family":"passwd_shell","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"BEGIN{FS=\":\"}$7==\"/bin/bash\"{print $1}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0015","request":"Using colon separators, print username and UID for accounts with UID at least 1000 and below 1002.","program":"BEGIN{FS=\":\";OFS=\":\"}$3>=1000&&$3<1002{print $1,$3}","input_text":"root:x:0:0:root:/root:/bin/bash\ndaemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin\nalice:x:1000:1000:Alice:/home/alice:/bin/bash\nbruno:x:1001:1001:Bruno:/home/bruno:/bin/zsh\nchen:x:1002:1002:Chen:/home/chen:/bin/bash\n","expected_output":"alice:1000\nbruno:1001\n","validation_input":"root:x:0:0:root:/root:/bin/bash\ndina:x:1000:1000:Dina:/home/dina:/bin/sh\neli:x:1001:1001:Eli:/home/eli:/bin/bash\n","validation_output":"dina:1000\neli:1001\n","family":"passwd_uid_range","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"BEGIN{FS=\":\";OFS=\":\"}$3>=1000&&$3<=1002{print $1,$3}","valid":true,"correct":false,"error":null} | |
| {"id":"awkweave-challenge-0016","request":"For colon-delimited passwd records, count users per login shell in order of first appearance.","program":"BEGIN{FS=\":\"}{if(!($7 in counts))order[++n]=$7;counts[$7]++}END{for(i=1;i<=n;i++)print order[i],counts[order[i]]}","input_text":"root:x:0:0:root:/root:/bin/bash\ndaemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin\nalice:x:1000:1000:Alice:/home/alice:/bin/bash\nbruno:x:1001:1001:Bruno:/home/bruno:/bin/zsh\nchen:x:1002:1002:Chen:/home/chen:/bin/bash\n","expected_output":"/bin/bash 3\n/usr/sbin/nologin 1\n/bin/zsh 1\n","validation_input":"root:x:0:0:root:/root:/bin/bash\ndina:x:1000:1000:Dina:/home/dina:/bin/sh\neli:x:1001:1001:Eli:/home/eli:/bin/bash\n","validation_output":"/bin/bash 2\n/bin/sh 1\n","family":"passwd_shell_counts","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"BEGIN{FS=\":\"}{if(!($7 in counts))order[++n]=$7;counts[$7]++}END{for(i=1;i<=n;i++)print order[i],counts[order[i]]}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0017","request":"Extract the service value from each record whose level value is error, ignoring level letter case.","program":"{service=\"\";level=\"\";for(i=1;i<=NF;i++){split($i,parts,\"=\");if(parts[1]==\"service\")service=parts[2];if(parts[1]==\"level\")level=tolower(parts[2])}if(level==\"error\")print service}","input_text":"2026-11-28T09:00:00Z level=info service=web latency=12\n2026-11-28T09:01:00Z level=error service=db latency=40\n2026-11-28T09:02:00Z level=INFO service=web latency=18\n2026-11-28T09:03:00Z level=warn service=db latency=25\n","expected_output":"db\n","validation_input":"2026-11-28T12:00:00Z level=error service=api latency=33\n2026-11-28T12:01:00Z level=info service=api latency=9\n2026-11-28T12:02:00Z level=ERROR service=worker latency=51\n","validation_output":"api\nworker\n","family":"keyvalue_errors","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"{service=\"\";level=\"\";for(i=1;i<=NF;i++){split($i,p,\"=\");if(p[1]==\"service\")service=p[2];if(p[1]==\"level\")level=tolower(p[2])}if(level==\"error\")print service}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0018","request":"Print timestamps with latency above 20. The timestamp is field 1 and latency is stored as latency=N in the final field.","program":"{split($NF,parts,\"=\");if(parts[2]+0>20)print $1}","input_text":"2026-11-28T09:00:00Z level=info service=web latency=12\n2026-11-28T09:01:00Z level=error service=db latency=40\n2026-11-28T09:02:00Z level=INFO service=web latency=18\n2026-11-28T09:03:00Z level=warn service=db latency=25\n","expected_output":"2026-11-28T09:01:00Z\n2026-11-28T09:03:00Z\n","validation_input":"2026-11-28T12:00:00Z level=error service=api latency=33\n2026-11-28T12:01:00Z level=info service=api latency=9\n2026-11-28T12:02:00Z level=ERROR service=worker latency=51\n","validation_output":"2026-11-28T12:00:00Z\n2026-11-28T12:02:00Z\n","family":"keyvalue_latency","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"{for(i=1;i<=NF;i++){split($i,p,\"=\");if(p[1]==\"latency\"&&p[2]+0>20)print $1}}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0019","request":"Print only events with timestamps from 2026-11-28T09:01:00Z through 2026-11-28T09:02:00Z inclusive.","program":"$1>=\"2026-11-28T09:01:00Z\"&&$1<=\"2026-11-28T09:02:00Z\"","input_text":"2026-11-28T09:00:00Z level=info service=web latency=12\n2026-11-28T09:01:00Z level=error service=db latency=40\n2026-11-28T09:02:00Z level=INFO service=web latency=18\n2026-11-28T09:03:00Z level=warn service=db latency=25\n","expected_output":"2026-11-28T09:01:00Z level=error service=db latency=40\n2026-11-28T09:02:00Z level=INFO service=web latency=18\n","validation_input":"2026-11-28T12:00:00Z level=error service=api latency=33\n2026-11-28T12:01:00Z level=info service=api latency=9\n2026-11-28T12:02:00Z level=ERROR service=worker latency=51\n","validation_output":"","family":"event_window","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"$1 >= \"2026-11-28T09:01:00Z\" && $1 <= \"2026-11-28T09:02:00Z\"","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0020","request":"For each row after the first, print the group name and the change in column 2 from the previous row; for the first row print 0 as the change.","program":"{delta=$2-previous;if(NR==1)delta=0;print $1,delta;previous=$2}","input_text":"alpha 10 4\nbeta 20 0\nalpha 30 8\ngamma 5 2\nbeta 15 3\n","expected_output":"alpha 0\nbeta 10\nalpha 10\ngamma -25\nbeta 10\n","validation_input":"red 8 2\nred 12 4\nblue 7 0\ngreen 20 5\nblue 9 3\n","validation_output":"red 0\nred 4\nblue -5\ngreen 13\nblue -11\n","family":"running_delta","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"{change=$2-previous;if(NR==1)change=0;print $1,change;previous=$2}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0021","request":"For each group in column 1, print its largest value from column 2 in first-appearance order.","program":"{if(!($1 in max)||$2>max[$1])max[$1]=$2;if(!($1 in seen)){order[++n]=$1;seen[$1]=1}}END{for(i=1;i<=n;i++)print order[i],max[order[i]]}","input_text":"alpha 10 4\nbeta 20 0\nalpha 30 8\ngamma 5 2\nbeta 15 3\n","expected_output":"alpha 30\nbeta 20\ngamma 5\n","validation_input":"red 8 2\nred 12 4\nblue 7 0\ngreen 20 5\nblue 9 3\n","validation_output":"red 12\nblue 9\ngreen 20\n","family":"group_maximum","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"{if(!($1 in largest)){largest[$1]=$2;order[++n]=$1}}END{for(i=1;i<=n;i++)print order[i],largest[order[i]]}","valid":true,"correct":false,"error":null} | |
| {"id":"awkweave-challenge-0022","request":"Print each group from column 1 with its first and last value from column 2, in first-appearance order.","program":"{if(!($1 in first)){first[$1]=$2;order[++n]=$1}last[$1]=$2}END{for(i=1;i<=n;i++)print order[i],first[order[i]],last[order[i]]}","input_text":"alpha 10 4\nbeta 20 0\nalpha 30 8\ngamma 5 2\nbeta 15 3\n","expected_output":"alpha 10 30\nbeta 20 15\ngamma 5 5\n","validation_input":"red 8 2\nred 12 4\nblue 7 0\ngreen 20 5\nblue 9 3\n","validation_output":"red 8 12\nblue 7 9\ngreen 20 20\n","family":"first_last_group","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"{if(!($1 in first)){first[$1]=$2;order[++n]=$1}last[$1]=$2}END{for(i=1;i<=n;i++)print order[i],first[order[i]],last[order[i]]}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0023","request":"Print group and the ratio of column 3 to column 2 as a percentage with one decimal; skip zero denominators.","program":"$2!=0{printf \"%s %.1f%%\\n\",$1,100*$3/$2}","input_text":"alpha 10 4\nbeta 20 0\nalpha 30 8\ngamma 5 2\nbeta 15 3\n","expected_output":"alpha 40.0%\nbeta 0.0%\nalpha 26.7%\ngamma 40.0%\nbeta 20.0%\n","validation_input":"red 8 2\nred 12 4\nblue 7 0\ngreen 20 5\nblue 9 3\n","validation_output":"red 25.0%\nred 33.3%\nblue 0.0%\ngreen 25.0%\nblue 33.3%\n","family":"positive_ratio","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"$2!=0{printf \"%s %.1f%%\\n\",$1,100*$3/$2}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0024","request":"Print every row with column 2 clamped to the inclusive range 8 through 18; leave other fields unchanged.","program":"{if($2<8)$2=8;else if($2>18)$2=18;print}","input_text":"alpha 10 4\nbeta 20 0\nalpha 30 8\ngamma 5 2\nbeta 15 3\n","expected_output":"alpha 10 4\nbeta 18 0\nalpha 18 8\ngamma 8 2\nbeta 15 3\n","validation_input":"red 8 2\nred 12 4\nblue 7 0\ngreen 20 5\nblue 9 3\n","validation_output":"red 8 2\nred 12 4\nblue 8 0\ngreen 18 5\nblue 9 3\n","family":"clamp_values","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"{if($2<8)$2=8;else if($2>18)$2=18;print}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0025","request":"Suppress only consecutive duplicate group names in column 1, printing one complete row per run.","program":"$1!=previous{print}{previous=$1}","input_text":"alpha 10 4\nbeta 20 0\nalpha 30 8\ngamma 5 2\nbeta 15 3\n","expected_output":"alpha 10 4\nbeta 20 0\nalpha 30 8\ngamma 5 2\nbeta 15 3\n","validation_input":"red 8 2\nred 12 4\nblue 7 0\ngreen 20 5\nblue 9 3\n","validation_output":"red 8 2\nblue 7 0\ngreen 20 5\nblue 9 3\n","family":"consecutive_dedup","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"$1!=previous{print}{previous=$1}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0026","request":"Remove blank and whitespace-only lines, leaving all other lines unchanged.","program":"$0 ~ /[^[:space:]]/","input_text":"alpha 1\n\nbeta 2\n \nalpha 3\n","expected_output":"alpha 1\nbeta 2\nalpha 3\n","validation_input":"red 4\n\n\nblue 5\n","validation_output":"red 4\nblue 5\n","family":"blank_filter","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"$0 ~ /[^[:space:]]/","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0027","request":"Count blank or whitespace-only lines and print the count.","program":"$0 !~ /[^[:space:]]/{n++}END{print n+0}","input_text":"alpha 1\n\nbeta 2\n \nalpha 3\n","expected_output":"2\n","validation_input":"red 4\n\n\nblue 5\n","validation_output":"2\n","family":"blank_count","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"$0 !~ /[^[:space:]]/{n++}END{print n+0}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0028","request":"Prefix each non-empty line with its original line number, a colon, and one space.","program":"$0 ~ /[^[:space:]]/{print NR \": \" $0}","input_text":"alpha 1\n\nbeta 2\n \nalpha 3\n","expected_output":"1: alpha 1\n3: beta 2\n5: alpha 3\n","validation_input":"red 4\n\n\nblue 5\n","validation_output":"1: red 4\n4: blue 5\n","family":"line_numbers","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"$0 ~ /[^[:space:]]/{print NR \": \" $0}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0029","request":"Print the total number of characters in the input, excluding newline characters.","program":"{total+=length($0)}END{print total+0}","input_text":"alpha 1\n\nbeta 2\n \nalpha 3\n","expected_output":"23\n","validation_input":"red 4\n\n\nblue 5\n","validation_output":"11\n","family":"character_count","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"{n+=length($0)}END{print n+0}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0030","request":"Convert simple comma-separated rows to tab-separated rows, preserving every field in order.","program":"BEGIN{FS=\",\";OFS=\"\\t\"}{$1=$1;print}","input_text":"a,1,x\nb,2,y\n","expected_output":"a\t1\tx\nb\t2\ty\n","validation_input":"c,3,z\nd,4,w\n","validation_output":"c\t3\tz\nd\t4\tw\n","family":"comma_to_tab","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"BEGIN{FS=\",\";OFS=\"\\t\"}{$1=$1;print}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0031","request":"Print column 1 right-aligned in a width of 8, followed by column 2 with no extra separator beyond the padding.","program":"{printf \"%8s%s\\n\",$1,$2}","input_text":"alpha 10 4\nbeta 20 0\nalpha 30 8\ngamma 5 2\nbeta 15 3\n","expected_output":" alpha10\n beta20\n alpha30\n gamma5\n beta15\n","validation_input":"red 8 2\nred 12 4\nblue 7 0\ngreen 20 5\nblue 9 3\n","validation_output":" red8\n red12\n blue7\n green20\n blue9\n","family":"fixed_width","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"{printf \"%8s%s\\n\",$1,$2}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0032","request":"For every record, print group and the absolute difference between columns 2 and 3.","program":"{difference=$2-$3;if(difference<0)difference=-difference;print $1,difference}","input_text":"alpha 10 4\nbeta 20 0\nalpha 30 8\ngamma 5 2\nbeta 15 3\n","expected_output":"alpha 6\nbeta 20\nalpha 22\ngamma 3\nbeta 12\n","validation_input":"red 8 2\nred 12 4\nblue 7 0\ngreen 20 5\nblue 9 3\n","validation_output":"red 6\nred 8\nblue 7\ngreen 15\nblue 6\n","family":"absolute_difference","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"{d=$2-$3;if(d<0)d=-d;print $1,d}","valid":true,"correct":true,"error":null} | |
| {"id":"awkweave-challenge-0033","request":"Print each distinct word from column 1 once, sorted in ascending lexical order.","program":"{seen[$1]=1}END{for(word in seen){value[++n]=word}for(i=2;i<=n;i++){x=value[i];j=i-1;while(j>=1&&value[j]>x){value[j+1]=value[j];j--}value[j+1]=x}for(i=1;i<=n;i++)print value[i]}","input_text":"alpha 10 4\nbeta 20 0\nalpha 30 8\ngamma 5 2\nbeta 15 3\n","expected_output":"alpha\nbeta\ngamma\n","validation_input":"red 8 2\nred 12 4\nblue 7 0\ngreen 20 5\nblue 9 3\n","validation_output":"blue\ngreen\nred\n","family":"sorted_unique_words","difficulty":3,"split":"challenge","source":"original-hand-authored","license":"CC-BY-4.0","prediction":"{seen[$1]=1}END{for(word in seen){value[++n]=word}for(i=2;i<=n;i++){x=value[i];j=i-1;while(j>=1&&value[j]>x){value[j+1]=value[j];j--}value[j+1]=x}for(i=1;i<=n;i++)print value[i]}","valid":true,"correct":true,"error":null} | |