What this model does
Given a concurrent Go program and a partial execution trace (goroutine scheduler events),
predict the next scheduler event:
Input: Go source + partial trace (GoStart, GoBlock, GoUnblock, GoCreate, GoEnd, GoSched)
Output: {"event_type": "GoBlock", "goroutine_id": 3, "reasoning": "...", "confidence": "high"}
Training
Table with columns: Setting, Value| Setting | Value |
|---|
| Base model | Qwen/Qwen3-8B |
| Method | Unsloth + QLoRA, trajectory-level |
| Dataset | kavirubc/weave-bench (data/train_trajectory.jsonl) |
| Train examples | 680 (multi-step trajectory sequences, 18 with Phase 20 enriched channel/mutex state) |
| Epochs | 3 |
Results (Phase 20)
Table with columns: Model, Val set, Accuracy, Notes| Model | Val set | Accuracy | Notes |
|---|
| Qwen3-8B base zero-shot | 545 traj val | 37.4% | — |
| Qwen3-8B CE fine-tuned | 798 GoKer | 36.0% | — |
| Qwen2.5-7B traj fine-tuned (Phase 16) | 798 GoKer | 40.1% | 10.48 mean survival steps |
| Qwen3-8B traj fine-tuned (this model) | 545 traj val | 47.2% |
Note on comparability: The 47.2% is evaluated on val_trajectory.jsonl (545 examples: 525 GoKer subset + 20 Phase 20 instrumented with channel/mutex state), while Phase 16's 40.1% used the full 798 GoKer set. Direct comparison requires re-eval on the 798-example set.
GoUnblock recovery (Phase 20 key finding): GoUnblock accuracy improved from 0% (Phase 16) to 9% (3/34 correct) on GoKer examples — driven by 18 training examples with enriched channel/mutex state in the prompt. The 3 correct GoUnblock predictions are all on standard GoKer programs (not the instrumented p20val_ examples), confirming the observability signal generalises.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen3-8B", torch_dtype=torch.float16, device_map="auto"
)
model = PeftModel.from_pretrained(base, "kavirubc/weave-ccwm-qwen3-8b-traj-lora")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-8B")
Citation
@misc{weave2026,
author = {Hapuarachchi, Kaviru},
title = {Weave: Concurrent Code World Models},
year = {2026},
url = {https://arxiv.org/abs/2606.17508}
}