kavirubc/weave-bench
Preview • Updated • 57
How to use kavirubc/weave-ccwm-qwen25coder-7b-traj-lora with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("/workspace/hf_cache/hub/models--Qwen--Qwen2.5-Coder-7B-Instruct/snapshots/c03e6d358207e414f1eca0bb1891e29f1db0e242")
model = PeftModel.from_pretrained(base_model, "kavirubc/weave-ccwm-qwen25coder-7b-traj-lora")A LoRA adapter fine-tuned on Weave-Bench using trajectory-level training for next-scheduler-event prediction in concurrent Go programs. Part of the Weave project on Concurrent Code World Models (CCWM).
This model is trained on WeaveChan/WeaveMutex-instrumented programs (Phase 21+ dataset), enabling GoUnblock event prediction beyond the 0% information-theoretic floor of uninstrumented traces.
| Event | Correct | Total | Accuracy |
|---|---|---|---|
| GoStart | 140 | 211 | 66.4% |
| GoBlock | 144 | 176 | 81.8% |
| GoCreate | 11 | 56 | 19.6% |
| GoUnblock | 9 | 35 | 25.7% |
| GoEnd | 0 | 25 | 0% |
| GoSched | 0 | 42 | 0% |
| Overall | 304 | 545 | 55.8% |
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}
| Setting | Value |
|---|---|
| Base model | Qwen/Qwen2.5-Coder-7B-Instruct |
| Method | Unsloth + QLoRA, trajectory-level |
| Dataset | kavirubc/weave-bench (data/train_trajectory.jsonl) |
| Epochs | 3 |
| train_loss | 0.02501 |
| GPU | RTX 4000 Ada (20GB) |
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
base = AutoModelForCausalLM.from_pretrained(
"Qwen/Qwen2.5-Coder-7B-Instruct", torch_dtype=torch.float16, device_map="auto"
)
model = PeftModel.from_pretrained(base, "kavirubc/weave-ccwm-qwen25coder-7b-traj-lora")
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-Coder-7B-Instruct")
@misc{weave2026,
author = {Hapuarachchi, Kaviru},
title = {Weave: Concurrent Code World Models},
year = {2026},
url = {https://arxiv.org/abs/2606.17508}
}