Text Generation
Transformers
Safetensors
English
llama
WithinUsAI
WIUAI.Mini.Coder
tool-calling
function-calling
full-finetuning
assistant-only-loss
302m
stage2
text-generation-inference
Instructions to use WithinUsAI/WIUAI.Mini.Coder.ToolCalling.Stage2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use WithinUsAI/WIUAI.Mini.Coder.ToolCalling.Stage2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="WithinUsAI/WIUAI.Mini.Coder.ToolCalling.Stage2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("WithinUsAI/WIUAI.Mini.Coder.ToolCalling.Stage2") model = AutoModelForCausalLM.from_pretrained("WithinUsAI/WIUAI.Mini.Coder.ToolCalling.Stage2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use WithinUsAI/WIUAI.Mini.Coder.ToolCalling.Stage2 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.ToolCalling.Stage2" # 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.ToolCalling.Stage2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/WithinUsAI/WIUAI.Mini.Coder.ToolCalling.Stage2
- SGLang
How to use WithinUsAI/WIUAI.Mini.Coder.ToolCalling.Stage2 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.ToolCalling.Stage2" \ --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.ToolCalling.Stage2", "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.ToolCalling.Stage2" \ --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.ToolCalling.Stage2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use WithinUsAI/WIUAI.Mini.Coder.ToolCalling.Stage2 with Docker Model Runner:
docker model run hf.co/WithinUsAI/WIUAI.Mini.Coder.ToolCalling.Stage2
Publish WIUAI Mini Coder ToolCalling Stage 2 checkpoint
Browse files- README.md +80 -0
- config.json +32 -0
- dataset_audit.json +8 -0
- generation_config.json +11 -0
- model.safetensors +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +40 -0
- training_args.bin +3 -0
- training_metrics.json +8 -0
README.md
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
library_name: transformers
|
| 6 |
+
pipeline_tag: text-generation
|
| 7 |
+
tags:
|
| 8 |
+
- WithinUsAI
|
| 9 |
+
- WIUAI.Mini.Coder
|
| 10 |
+
- tool-calling
|
| 11 |
+
- function-calling
|
| 12 |
+
- full-finetuning
|
| 13 |
+
- assistant-only-loss
|
| 14 |
+
- 302m
|
| 15 |
+
- stage2
|
| 16 |
+
datasets:
|
| 17 |
+
- NousResearch/hermes-function-calling-v1
|
| 18 |
+
---
|
| 19 |
+
|
| 20 |
+
# WIUAI Mini Coder ToolCalling — Stage 2
|
| 21 |
+
|
| 22 |
+
Stage 2 full-parameter fine-tuning of
|
| 23 |
+
`WithinUsAI/WIUAI.Mini.Coder.ToolCalling`.
|
| 24 |
+
|
| 25 |
+
## Model
|
| 26 |
+
|
| 27 |
+
- Parameters: 302,027,520
|
| 28 |
+
- Vocabulary: 49,152
|
| 29 |
+
- Maximum sequence length: 1,024
|
| 30 |
+
- Training: full-parameter fine-tuning
|
| 31 |
+
- LoRA / adapters: not used
|
| 32 |
+
- Precision: as configured by the training run
|
| 33 |
+
|
| 34 |
+
## Training data
|
| 35 |
+
|
| 36 |
+
Dataset: `NousResearch/hermes-function-calling-v1`
|
| 37 |
+
|
| 38 |
+
Configurations:
|
| 39 |
+
- `func_calling_singleturn`
|
| 40 |
+
- `func_calling`
|
| 41 |
+
- `glaive_func_calling`
|
| 42 |
+
|
| 43 |
+
Dataset audit:
|
| 44 |
+
- Raw examples: 8,995
|
| 45 |
+
- Accepted examples: 4,873
|
| 46 |
+
- Duplicates removed: 795
|
| 47 |
+
- Overlength examples dropped: 2,442
|
| 48 |
+
- Invalid examples: 0
|
| 49 |
+
- No-tool-call examples: 885
|
| 50 |
+
|
| 51 |
+
Sequences exceeding 1,024 tokens were dropped rather than truncated.
|
| 52 |
+
Training used assistant-only supervised tokens.
|
| 53 |
+
|
| 54 |
+
## Training results
|
| 55 |
+
|
| 56 |
+
- Epochs completed: 2
|
| 57 |
+
- Optimizer steps: 610
|
| 58 |
+
- Peak learning rate: 8e-6
|
| 59 |
+
- Effective global batch size: 16
|
| 60 |
+
- Runtime: approximately 1,202 seconds
|
| 61 |
+
- Final reported training loss: 0.09209
|
| 62 |
+
|
| 63 |
+
Training loss is not a behavioral benchmark. Function selection,
|
| 64 |
+
argument accuracy, multi-call behavior, clarification, and safe
|
| 65 |
+
tool-use behavior require separate evaluation.
|
| 66 |
+
|
| 67 |
+
## Intended use
|
| 68 |
+
|
| 69 |
+
Research and evaluation of structured function-calling behavior
|
| 70 |
+
using the Hermes-style `<tools>` and `<tool_call>` format.
|
| 71 |
+
|
| 72 |
+
The model generates tool-call requests. It does not execute tools
|
| 73 |
+
or independently authorize external actions.
|
| 74 |
+
|
| 75 |
+
## Limitations
|
| 76 |
+
|
| 77 |
+
This checkpoint has completed training, but successful training
|
| 78 |
+
does not establish reliable tool-calling performance. Evaluate
|
| 79 |
+
with held-out prompts and validate generated function names and
|
| 80 |
+
arguments against their supplied schemas before execution.
|
config.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LlamaForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 0,
|
| 8 |
+
"dtype": "float32",
|
| 9 |
+
"eos_token_id": 0,
|
| 10 |
+
"head_dim": 96,
|
| 11 |
+
"hidden_act": "silu",
|
| 12 |
+
"hidden_size": 768,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 3072,
|
| 15 |
+
"max_position_embeddings": 1024,
|
| 16 |
+
"mlp_bias": false,
|
| 17 |
+
"model_type": "llama",
|
| 18 |
+
"num_attention_heads": 8,
|
| 19 |
+
"num_hidden_layers": 24,
|
| 20 |
+
"num_key_value_heads": 8,
|
| 21 |
+
"pad_token_id": 0,
|
| 22 |
+
"pretraining_tp": 1,
|
| 23 |
+
"rms_norm_eps": 1e-05,
|
| 24 |
+
"rope_parameters": {
|
| 25 |
+
"rope_theta": 10000.0,
|
| 26 |
+
"rope_type": "default"
|
| 27 |
+
},
|
| 28 |
+
"tie_word_embeddings": false,
|
| 29 |
+
"transformers_version": "5.20.2",
|
| 30 |
+
"use_cache": false,
|
| 31 |
+
"vocab_size": 49152
|
| 32 |
+
}
|
dataset_audit.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"raw": 8995,
|
| 3 |
+
"accepted": 4873,
|
| 4 |
+
"duplicates": 795,
|
| 5 |
+
"overlength": 2442,
|
| 6 |
+
"invalid": 0,
|
| 7 |
+
"no_tool_call": 885
|
| 8 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 0,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
0,
|
| 6 |
+
2
|
| 7 |
+
],
|
| 8 |
+
"pad_token_id": 0,
|
| 9 |
+
"transformers_version": "5.20.2",
|
| 10 |
+
"use_cache": false
|
| 11 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1c26d9c602d730ef15bcb64df093efbbe5118f35cb2e502254ff106b1fe5a619
|
| 3 |
+
size 1208134600
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": "<|endoftext|>",
|
| 5 |
+
"clean_up_tokenization_spaces": false,
|
| 6 |
+
"eos_token": "<|endoftext|>",
|
| 7 |
+
"errors": "replace",
|
| 8 |
+
"extra_special_tokens": [
|
| 9 |
+
"<|endoftext|>",
|
| 10 |
+
"<fim_prefix>",
|
| 11 |
+
"<fim_middle>",
|
| 12 |
+
"<fim_suffix>",
|
| 13 |
+
"<fim_pad>",
|
| 14 |
+
"<filename>",
|
| 15 |
+
"<gh_stars>",
|
| 16 |
+
"<issue_start>",
|
| 17 |
+
"<issue_comment>",
|
| 18 |
+
"<issue_closed>",
|
| 19 |
+
"<jupyter_start>",
|
| 20 |
+
"<jupyter_text>",
|
| 21 |
+
"<jupyter_code>",
|
| 22 |
+
"<jupyter_output>",
|
| 23 |
+
"<empty_output>",
|
| 24 |
+
"<commit_before>",
|
| 25 |
+
"<commit_msg>",
|
| 26 |
+
"<commit_after>",
|
| 27 |
+
"<reponame>"
|
| 28 |
+
],
|
| 29 |
+
"is_local": false,
|
| 30 |
+
"local_files_only": false,
|
| 31 |
+
"max_length": 1023,
|
| 32 |
+
"model_max_length": 1024,
|
| 33 |
+
"pad_token": "<|endoftext|>",
|
| 34 |
+
"stride": 0,
|
| 35 |
+
"tokenizer_class": "GPT2Tokenizer",
|
| 36 |
+
"truncation_side": "right",
|
| 37 |
+
"truncation_strategy": "longest_first",
|
| 38 |
+
"unk_token": "<|endoftext|>",
|
| 39 |
+
"vocab_size": 49152
|
| 40 |
+
}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:58d18015e881f9108cae2b9f5b9e0f4e2d2d4f1723ed5bde1d0388963e063a89
|
| 3 |
+
size 5201
|
training_metrics.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"train_runtime": 1202.2308,
|
| 3 |
+
"train_samples_per_second": 8.107,
|
| 4 |
+
"train_steps_per_second": 0.507,
|
| 5 |
+
"total_flos": 1.1870361754796032e+16,
|
| 6 |
+
"train_loss": 0.09209377575116079,
|
| 7 |
+
"epoch": 2.0
|
| 8 |
+
}
|