Views
No views yet
gyunggyng/lfm-graph-preflexor (fork of
lamm-mit/graph-preflexor-grpo, arXiv 2607.00924v1).principled-intelligence/Qwen3.5-9B-text-only
(Qwen3_5TextForCausalLM, model_type: qwen3_5_text, hybrid
linear + full attention)checkpoint-250 merged into the base.ORPOTrainer, PEFT LoRA (r=32, alpha=64,
dropout=0.05, targets = q/k/v/o/gate/up/down).lamm-mit/graph_reasoning_10K filtered for graph-reasoning
items with structured <brainstorm>...<synthesis> reasoning targets.torch 2.12.0.dev20260407+cu128,
transformers 5.5.4, bfloat16.concatenated_forward OOMs at 9B + seq 5632).| Metric | Value |
|---|---|
| ORPO loss | 1.413 → 0.98 (step 295, crashed at final eval) |
| ORPO accuracy | 1.0 (from step 55) |
| Eval score (rq,depth,trace,overall, /10) | 5.42 / 6.60 / 6.38 / 6.13 |
| Sentinel hit-rate (100 q) | brainstorm 99, graph 94, graph_json 79, patterns 85, synthesis 84 |
scripts/05c_eval_transformers.py (4-GPU shard-parallel
transformers, eager attention, thinking enabled) because vLLM 0.19 / 0.20
do not register Qwen3_5TextForCausalLM — see "Known limitations" below.<think>:<think>
<brainstorm>... free-form exploration ...</brainstorm>
<graph>... concept graph (natural language) ...</graph>
<graph_json>{"nodes": [...], "edges": [...]}</graph_json>
<patterns>... reusable abstractions ...</patterns>
<synthesis>... integrated reasoning ...</synthesis>
</think>
final answer1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model = AutoModelForCausalLM.from_pretrained(
4 "LLM-OS-Models/Qwen3.5-9B-Graph-Preflexor-ORPO",
5 dtype="bfloat16", device_map="auto", trust_remote_code=True,
6)
7tok = AutoTokenizer.from_pretrained(
8 "LLM-OS-Models/Qwen3.5-9B-Graph-Preflexor-ORPO",
9 trust_remote_code=True,
10)
11prompt = tok.apply_chat_template(
12 [{"role": "user", "content": "Your graph-reasoning question here"}],
13 tokenize=False, add_generation_prompt=True,
14)
15inputs = tok(prompt, return_tensors="pt").to(model.device)
16out = model.generate(**inputs, max_new_tokens=3500, do_sample=True, temperature=0.2)
17print(tok.decode(out[0, inputs.input_ids.shape[1]:], skip_special_tokens=False))attn_implementation="eager" is required if flash-linear-attention is
not installed; SDPA silently returns empty tokens otherwise.Qwen3_5TextForCausalLM is not in vLLM's registered
architectures as of vLLM 0.20.2 (only Qwen3_5ForConditionalGeneration
/ Qwen3_5MoeForConditionalGeneration / Qwen3_5MTP are). vLLM's
generic TransformersForCausalLM wrapper also fails because it expects
the multimodal prefix model.language_model.*, while text-only weights
are flat at model.layers.*. Use transformers for inference until vLLM
adds native text-only Qwen3.5 support.ORPOTrainer forces a final evaluate() after
training, which OOMs on 9B + seq 5632 in concatenated_forward.
Checkpoint-250 (saved before the crash) is what's merged here.1@article{graphpreflexor2025,
2 title={Graph-PRefLexOR: Graph-based Preference-based Reasoning via Learning},
3 doi={10.48550/arXiv.2607.00924}
4}