Views
No views yet
chat_template.jinja — this LoRA is trained directly on those rails.Current revision = v2 (corrected data, 1,718 examples, 39 min on MPS): 100% parse / function / args-exact on the frozen 40 unseen call questions, 16.7% false-call on strict no-call cases. The original 400-example sprint adapter remains incheckpoint-400/. The v1 full-data run was halted deliberately after checkpoint evals exposed a training-label flaw — see "The v1 data flaw" below; the negative result is published, not hidden.
| Condition | Parse rate | Func-name acc | Args exact | False-call rate |
|---|---|---|---|---|
| base, zero-shot | 35.0% | 32.5% | 0.0% | 0.0%¹ |
| base, 2-shot | 67.5% | 30.0% | 0.0% | 41.7% |
| + this LoRA, 400 ex. (current revision) | 92.5% | 92.5% | 90.0% | 41.7% |
| + LoRA v1 ckpt @ 3.2k ex. | 87.5% | 87.5% | 87.5% | 25.0% |
| + LoRA v1 ckpt @ 6.4k ex. (run halted) | 55.0% | 55.0% | 55.0% | 16.7% |
| + LoRA v2 (fixed data, 1,718 ex., 39 min) | 100% | 100% | 100% | **16.7%**² |

eval/. An earlier eval
measured 97.5% but was contaminated (41/52 queries leaked into training via
glaive's row duplication); it was discarded and rebuilt — details in the
project repo.1import torch
2from peft import PeftModel
3from transformers import AutoModelForCausalLM, AutoTokenizer
4
5base = "pfnet/plamo-3-nict-2b-base" # gated: accept the PLaMo Community License
6tok = AutoTokenizer.from_pretrained(base, trust_remote_code=True)
7model = AutoModelForCausalLM.from_pretrained(base, trust_remote_code=True, dtype=torch.bfloat16)
8model = PeftModel.from_pretrained(model, "Gurunath/plamo-3-nict-2b-tool-calling-lora")
9
10messages = [
11 {"role": "system", "content": (
12 "You are a helpful assistant with access to the following tools. "
13 "When the user's request requires a tool, respond with ONLY a JSON object "
14 '{"name": <function-name>, "arguments": <args-object>}. '
15 "If no tool is needed, answer normally.\nTools:\n"
16 '{"name": "get_weather", "description": "Get current weather", '
17 '"parameters": {"type": "object", "properties": {"location": {"type": "string"}}, '
18 '"required": ["location"]}}')},
19 {"role": "user", "content": "What's the weather in Osaka right now?"},
20]
21ids = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt")
22out = model.generate(ids, max_new_tokens=64, do_sample=False)
23print(tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True))
24# {"name": "get_weather", "arguments": {"location": "Osaka"}}pfnet/plamo-3-nict-2b-base (2.6B, attention-only), official chat templateglaiveai/glaive-function-calling-v2 (Apache 2.0), query-level deduplicated| Path | What |
|---|---|
/ (root) | v2 adapter — the release (fixed data, 100% args-exact on frozen eval) |
checkpoint-400/ | The 5-minute sprint adapter (400 examples, 90% args-exact) |
checkpoint-v1-step400/, checkpoint-v1-step800/ | Mid-training checkpoints of the halted v1 run (3,200 / 6,400 examples) — the models behind the degradation curve; load them to reproduce the data-flaw analysis |
eval/*.json | Per-question results (question, gold, prediction) for all six evaluated conditions |
eval/data/eval-v2.jsonl | The frozen 52-question eval set (40 call + 12 strict no-call) all table rows use |
eval/data/eval-v1.jsonl | The v1-era eval set (deferred-style no-call cases), kept for comparison |
figures/ | The v1 degradation curve |
pfnet/plamo-3-nict-2b-base) and load with
PeftModel.from_pretrained(model, REPO, subfolder=...).license_link). Non-commercial use is free; commercial use is subject to PFN's
license terms — see the license
and PFN's registration requirements. Training data is Apache 2.0.