Text Generation
Transformers
Safetensors
HERMES
English
llama
WIUAI
WIUAI.Mini.Coder
code-llm
code-generation
code-completion
programming
algorithmic-reasoning
small-language-model
compact-llm
from-scratch
causal-language-model
starcoder-tokenizer
supervised-fine-tuning
pretraining
multi-stage-training
tpu
google-tpu-research-cloud
TRC
function-calling
tool-use
chatml
full-fine-tune
withinusai
text-generation-inference
Instructions to use WithinUsAI/WIUAI.Mini.Coder.Traces with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use WithinUsAI/WIUAI.Mini.Coder.Traces with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="WithinUsAI/WIUAI.Mini.Coder.Traces")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("WithinUsAI/WIUAI.Mini.Coder.Traces") model = AutoModelForCausalLM.from_pretrained("WithinUsAI/WIUAI.Mini.Coder.Traces", device_map="auto") - HERMES
How to use WithinUsAI/WIUAI.Mini.Coder.Traces with HERMES:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use WithinUsAI/WIUAI.Mini.Coder.Traces with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "WithinUsAI/WIUAI.Mini.Coder.Traces" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "WithinUsAI/WIUAI.Mini.Coder.Traces", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/WithinUsAI/WIUAI.Mini.Coder.Traces
- SGLang
How to use WithinUsAI/WIUAI.Mini.Coder.Traces 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 "WithinUsAI/WIUAI.Mini.Coder.Traces" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "WithinUsAI/WIUAI.Mini.Coder.Traces", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "WithinUsAI/WIUAI.Mini.Coder.Traces" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "WithinUsAI/WIUAI.Mini.Coder.Traces", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use WithinUsAI/WIUAI.Mini.Coder.Traces with Docker Model Runner:
docker model run hf.co/WithinUsAI/WIUAI.Mini.Coder.Traces
|
Download README.md from WithinUsAI/WIUAI.Mini.Coder.Traces: direct link, hf CLI and curl.
- Browser
- Download file 7.04 kB
-
https://huggingface.co/WithinUsAI/WIUAI.Mini.Coder.Traces/resolve/fd418024fbd2fd2a74c5461ba6e10923753f676e/README.md
- Command line
-
hf download hf://WithinUsAI/WIUAI.Mini.Coder.Traces@fd418024fbd2fd2a74c5461ba6e10923753f676e/README.md
-
curl -L -o README.md https://huggingface.co/WithinUsAI/WIUAI.Mini.Coder.Traces/resolve/fd418024fbd2fd2a74c5461ba6e10923753f676e/README.md
7.04 kB
| language: | |
| - en | |
| library_name: transformers | |
| pipeline_tag: text-generation | |
| base_model: WithinUsAI/WIUAI.Mini.Coder.ToolCalling | |
| datasets: | |
| - greghavens/fable-5-coding-and-debugging-traces | |
| - greghavens/gpt-5.6-sol-coding-and-debugging-traces | |
| - greghavens/glm-5.2-coding-and-debugging-traces | |
| - HuggingFaceFW/fineweb-edu | |
| - nvidia/Nemotron-Pretraining-SFT-v1 | |
| - bigcode/starcoderdata | |
| - nvidia/Nemotron-Pretraining-Code-v1 | |
| - HuggingFaceFW/finewiki | |
| - open-web-math/open-web-math | |
| - nvidia/Nemotron-CC-Math-v1 | |
| - nvidia/OpenCodeInstruct | |
| - nvidia/OpenMathInstruct-2 | |
| tags: | |
| - WIUAI | |
| - WIUAI.Mini.Coder | |
| - code-llm | |
| - code-generation | |
| - code-completion | |
| - programming | |
| - algorithmic-reasoning | |
| - small-language-model | |
| - compact-llm | |
| - from-scratch | |
| - causal-language-model | |
| - llama | |
| - starcoder-tokenizer | |
| - supervised-fine-tuning | |
| - pretraining | |
| - multi-stage-training | |
| - tpu | |
| - google-tpu-research-cloud | |
| - TRC | |
| - 303m | |
| # WIUAI.Mini.Coder.Traces | |
| Full fine-tune of [WithinUsAI/WIUAI.Mini.Coder.ToolCalling](https://huggingface.co/WithinUsAI/WIUAI.Mini.Coder.ToolCalling) on coding and debugging agent-trace datasets by | |
| greghavens (listed below). Published by WithinUsAI. | |
| > **Status:** checkpoint at **step 233 of 233** (epoch 1.00 of 1). This README and the weights are | |
| > replaced automatically at every checkpoint, so the repo always holds one complete, latest model. | |
| > Elapsed training time so far: 66 min. No task benchmark has been run. | |
| ## Prompt format | |
| ChatML written as plain text: `<|im_start|>role\n...<|im_end|>\n` with roles system, user, assistant, tool. Tool calls are written as | |
| `<tool_call>` JSON `</tool_call>` and tool results as `<tool_response>` blocks. In this tokenizer `<|im_start|>` and `<|im_end|>` | |
| are ordinary text, not single tokens. Stop generation with a stop string and cut the output at the first `<|im_end|>`. | |
| ```python | |
| import torch | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| repo = "WithinUsAI/WIUAI.Mini.Coder.Traces" | |
| tok = AutoTokenizer.from_pretrained(repo) | |
| model = AutoModelForCausalLM.from_pretrained(repo, dtype=torch.float16, device_map="auto") | |
| prompt = ("<|im_start|>system\nYou are a coding agent.<|im_end|>\n" | |
| "<|im_start|>user\n" + USER_MESSAGE + "<|im_end|>\n" | |
| "<|im_start|>assistant\n") | |
| ids = tok(prompt, return_tensors="pt", add_special_tokens=False).to(model.device) | |
| out = model.generate(**ids, max_new_tokens=300, do_sample=False, stop_strings=["<|im_end|>"], tokenizer=tok) | |
| print(tok.decode(out[0][ids["input_ids"].shape[1]:]).split("<|im_end|>")[0]) | |
| ``` | |
| Keep prompt plus output under 1024 tokens, the model's context length. For long sessions, feed only the most recent messages. | |
| ## Training data | |
| Long rows: **rows over 1024 tokens keep only the most recent whole messages that fit, always including the full supervised message (the beginning of the session is cut)** | |
| | Dataset | License | Rows | Rejected | Duplicates | Target too long | Context cut | Examples used | In training split | Supervised | Note | | |
| |---|---|---|---|---|---|---|---|---|---|---| | |
| | [fable-5-coding-and-debugging-traces](https://huggingface.co/datasets/greghavens/fable-5-coding-and-debugging-traces) | CC BY 4.0 | 15961 | 0 | 0 | 1607 | 9614 | 3000 | 2933 | last_assistant | | | |
| | [gpt-5.6-sol-coding-and-debugging-traces](https://huggingface.co/datasets/greghavens/gpt-5.6-sol-coding-and-debugging-traces) | CC BY 4.0 | 17939 | 0 | 0 | 1335 | 15607 | 3000 | 2908 | last_assistant | | | |
| | [glm-5.2-coding-and-debugging-traces](https://huggingface.co/datasets/greghavens/glm-5.2-coding-and-debugging-traces) | other (see dataset card) | 3642 | 0 | 1825 | 129 | 1273 | 1688 | 1610 | last_assistant | | | |
| | [kimi-k3-coding-and-debugging-traces](https://huggingface.co/datasets/greghavens/kimi-k3-coding-and-debugging-traces) | CC BY 4.0 | 3956 | 0 | 0 | 0 | 0 | 0 | 0 | last_assistant | excluded: 34% of supervised tool calls have empty arguments | | |
| Attribution (CC BY 4.0 requires credit; check each dataset card for its license terms): | |
| - fable-5-coding-and-debugging-traces: https://huggingface.co/datasets/greghavens/fable-5-coding-and-debugging-traces (CC BY 4.0) | |
| - gpt-5.6-sol-coding-and-debugging-traces: https://huggingface.co/datasets/greghavens/gpt-5.6-sol-coding-and-debugging-traces (CC BY 4.0) | |
| - glm-5.2-coding-and-debugging-traces: https://huggingface.co/datasets/greghavens/glm-5.2-coding-and-debugging-traces (other (see dataset card)) | |
| Rows are converted to ChatML (tool schemas and hidden reasoning blocks are not included). Duplicates are removed (SHA-256). | |
| Loss is computed on assistant tokens only; the datasets use cumulative rows (each row a longer prefix of the same session), so only the | |
| last assistant message of each row is supervised. At most 3000 examples are taken from each dataset. The split is by session, so one | |
| session never appears in both train and validation. Split: 7451 train / 237 validation. Tokens per epoch: 4,136,424 | |
| (1,394,873 supervised). Seed 1147. | |
| ## Training | |
| | Setting | Value | | |
| |---|---| | |
| | Starting weights | WithinUsAI/WIUAI.Mini.Coder.ToolCalling | | |
| | Hardware | 2x Tesla T4 (Kaggle), DataParallel via Hugging Face Trainer | | |
| | Precision | fp32 master weights, fp16 mixed precision, activation checkpointing | | |
| | Context length | 1024 | | |
| | Batch | 4 per GPU x 2 GPUs x 4 accumulation = 32 | | |
| | Learning rate | 2e-05 peak, cosine, 3% warmup, weight decay 0.01, grad clip 1.0 | | |
| | Epochs | 1 (233 steps) | | |
| ## Progress (validation loss is on assistant tokens of the held-out sessions) | |
| Starting model before training: **3.3581** | |
| | Step | Epoch | Train loss | Validation loss | Spot check | | |
| |---|---|---|---|---| | |
| | 50 | 0.21 | 2.5812 | 2.5347 | 0/2 | | |
| | 100 | 0.43 | 2.1885 | 2.3185 | 0/2 | | |
| | 150 | 0.64 | 2.0826 | 2.2330 | 0/2 | | |
| | 200 | 0.86 | 2.0757 | 2.2083 | 0/2 | | |
| | 233 | 1.00 | 1.9277 | 2.2065 | 0/2 | | |
| ## Spot check at this checkpoint | |
| Two fixed coding prompts. Pass = the output contains an expected snippet. A tiny smoke test, not a benchmark. | |
| | Prompt | Pass | Stopped | Output | | |
| |---|---|---|---| | |
| | Write a Python function is_prime(n) that returns True if n is prime. | no | no | `<tool_call> / {"name": "exec", "arguments": {"source": "const r = await tools.exec_command({cmd:\"git status --short && git status --short &...` | | |
| | This code raises IndexError. Fix it: | no | no | `<tool_call> / {"name": "exec", "arguments": {"source": "const r = await tools.exec_command({\"cmd\":\"pwd && git status --short\",\"pwd\":\"...` | | |
| ## Limitations | |
| - Context is 1024 tokens, far shorter than a typical agent session. Training rows keep only the most recent messages, so the model rarely sees the system prompt or task statement of a long session. | |
| - Trained on traces produced by other AI models, so it can imitate their style without their reliability. | |
| - Tool-calling behavior learned from Hermes Function-Calling V1 may have regressed. It was not re-tested after this run. | |
| - The validation split is from the same datasets. No external benchmark was run. | |
| - Can produce incorrect code or malformed tool calls. Review output before running it. | |