Instructions to use Ameame1002/ClueWeaver with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Ameame1002/ClueWeaver with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("question-answering", model="Ameame1002/ClueWeaver")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Ameame1002/ClueWeaver", device_map="auto") - Notebooks
- Google Colab
- Kaggle
ClueWeaver
Reward-Guided Dual-Agent Evidence Reasoning for Compact LLMs on Literary Long Narratives
Official Finder and Interpreter checkpoints for ClueWeaver: Reward-Guided Dual-Agent Evidence Reasoning for Compact LLMs on Literary Long Narratives, accepted at ICONIP 2026.
ClueWeaver is an evidence-aware dual-agent framework for long-narrative question answering with compact local models. The Finder selects clue-bearing passages from retrieval-guided segments. The Interpreter answers from the selected evidence, provides paragraph-ID citations, and applies internal self-calibration for high-risk questions. Self-calibration uses the same Interpreter and evidence packet; it is not a separate agent.
Both agents use Qwen3-4B-Instruct and are trained separately with GRPO. Finder rewards emphasize evidence retention and faithful paragraph references; Interpreter rewards emphasize answer correctness, grounding, and concise explanations. See Sections 3.4-3.5 and Appendices A-B of the paper.
Checkpoints
| Model | Role |
|---|---|
| Finder | Evidence selection and rationale generation |
| Interpreter | Evidence-grounded interpretation |
Each directory contains full model weights, configuration, and tokenizer files, not LoRA adapters. Optimizer states and datasets are not included.
Loading
Select the required agent using subfolder:
from transformers import AutoModelForCausalLM, AutoTokenizer
repo_id = "Ameame1002/ClueWeaver"
agent = "Finder" # or "Interpreter"
tokenizer = AutoTokenizer.from_pretrained(repo_id, subfolder=agent)
model = AutoModelForCausalLM.from_pretrained(
repo_id, subfolder=agent, torch_dtype="auto", device_map="auto"
)
For the complete pipeline, download the repository with huggingface_hub.snapshot_download, then serve the Finder/ and Interpreter/ directories with a Qwen3-compatible inference engine. Use the prompts, retrieval, paragraph identifiers, answer parser, and self-calibration logic from the GitHub repository. Loading the weights alone does not reproduce the full pipeline.
As specified in Appendix B, disable model-internal thinking during inference (enable_thinking=False when applying the Qwen3 chat template). The structured responses use <reason> and <answer> fields; prompt templates are provided in Appendix E.
Main-result evidence packing (N_E, P_r, P_w, B_c) follows Appendix C. Here, N_E limits selected segments, P_r and P_w are paragraph budgets for retrieval-anchored and local-window segments, and B_c is the packed-evidence character budget.
| Dataset | Packing |
|---|---|
| DetectiveQA | (10, 4, 6, 15000) |
| InfiniteBench | (7, 3, 6, 14000) |
| LongBench v2 | (8, 4, 6, 15000) |
| NoCha | (10, 6, 8, 16000) |
Limitations
The Finder can omit important clues, and the Interpreter can produce incorrect answers or citations. Check generated reasoning against the source narrative. The released checkpoints target the paper's evidence-selection and reasoning tasks; generic chat prompting may behave differently.
Citation
@misc{zhu2026clueweaver,
title={ClueWeaver: Reward-Guided Dual-Agent Evidence Reasoning for Compact LLMs on Literary Long Narratives},
author={Jihao Zhu and Zhiwei Yang and Wenxiao Zhang and Junqian Zhao and Qi You and Fangqi Wang and Zheyuan Deng and Hanzhe Yang and Yu Liu and Jin B. Hong},
year={2026},
eprint={2608.25531},
archivePrefix={arXiv},
primaryClass={cs.CL},
url={https://arxiv.org/abs/2608.25531}
}