Views
No views yet

Qwen/Qwen3-0.6B-Base on a large synthetic corpus of multi-context, multi-hop QA with citation-anchored reasoning traces.Not enough information when the context does not support an answer.Qwen/Qwen3-0.6B-Base via supervised fine-tuning on a synthetic corpus of ~3.25M QA pairs (~2.78M single-hop, ~262k multi-hop single-context, ~165k multi-hop multi-context, and ~43k abstain examples), distilled from a larger teacher with citation-anchored reasoning traces. Multi-hop and multi-context subsets are oversampled to emphasize compositional reasoning. The prompt/response format is identical at training and inference time, so no train–test mismatch is introduced.| Model | HotpotQA In-Acc | MuSiQue In-Acc | TAT-QA F1 | ConFiQA In-Acc | ConFiQA M_R ↓ | MuSiQue-Un R-Acc |
|---|---|---|---|---|---|---|
| gemma-3-4b-it | 55.8 | 30.1 | 65.3 | 69.8 | 8.9 | 55.8 |
| Qwen3-1.7B (think) | 60.9 | 30.7 | 74.8 | 70.4 | 8.3 | 82.8 |
| Qwen3-4B (think) | 67.1 | 41.5 | 79.1 | 74.1 | 7.5 | 84.0 |
| Pleias-RAG-1.2B | 48.5 | 15.0 | 8.4 | 37.3 | 25.3 | 21.9 |
| OCC-RAG-0.6B | 57.6 | 36.6 | 75.0 | 79.9 | 5.2 | 86.9 |
<|query_start|> … <|query_end|> and each source in <|source_start|><|source_id|>N … <|source_end|>.| Section | Tokens | Content |
|---|---|---|
| Query analysis | <|query_analysis_start|> … <|query_analysis_end|> | Decomposes the question into what must be found. |
| Source analysis | <|source_analysis_start|> … <|source_analysis_end|> | Assesses each source's relevance, citing by <|source_id|>N. |
| Reasoning | <|reasoning_start|> … <|reasoning_end|> | Composes evidence across sources into a multi-hop chain. |
| Status | <|status_start|> … <|status_end|> | ANSWERABLE / UNANSWERABLE verdict. |
| Answer | <|answer_start|> … <|answer_end|> | The final answer span, or the refusal phrase. |
documents= kwarg and emits the structural tokens for the query and sources automatically — pass the user message as plain text and the sources as a list of dicts.1import re
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4MODEL = "occ-ai/OCC-RAG-0.6B"
5
6tokenizer = AutoTokenizer.from_pretrained(MODEL)
7model = AutoModelForCausalLM.from_pretrained(MODEL, torch_dtype="auto", device_map="auto")
8
9question = "Which country is the inventor of the telephone, Alexander Graham Bell, buried in?"
10documents = [
11 {"text": "Alexander Graham Bell was a Scottish-born inventor best known for patenting the first practical telephone."},
12 {"text": "Bell died on August 2, 1922, at his estate Beinn Bhreagh, near Baddeck, Nova Scotia, and was buried there."},
13 {"text": "Nova Scotia is a province on the east coast of Canada."},
14]
15
16text = tokenizer.apply_chat_template(
17 [{"role": "user", "content": question}],
18 documents=documents,
19 tokenize=False,
20 add_generation_prompt=True,
21 enable_thinking=False,
22)
23
24# Alternative: assemble the structural tokens yourself.
25#
26# query_start, query_end = "<|query_start|>", "<|query_end|>"
27# source_start, source_end, source_id = "<|source_start|>", "<|source_end|>", "<|source_id|>"
28#
29# def build_user_content(question, sources):
30# content = f"{query_start}{question}{query_end}\n"
31# for i, s in enumerate(sources, start=1):
32# content += f"{source_start}{source_id}{i} {s}{source_end}\n"
33# return content
34#
35# messages = [{"role": "user", "content": build_user_content(question, [d["text"] for d in documents])}]
36# text = tokenizer.apply_chat_template(
37# messages, tokenize=False, add_generation_prompt=True, enable_thinking=False
38# )
39
40inputs = tokenizer([text], return_tensors="pt").to(model.device)
41outputs = model.generate(**inputs, max_new_tokens=2048)
42response = tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=False)
43print(response)
44
45m = re.findall(r"<\|answer_start\|>(.*?)(?:<\|answer_end\|>|\Z)", response, re.DOTALL)
46print("Answer:", m[-1].strip() if m else "") # -> Canada[!NOTE] We recommend greedy decoding (do_sample=False), which is the training/evaluation default and is baked intogeneration_config.json. Qwen3's default sampling parameters (best practices) also work fine.
skip_special_tokens=False if you need to parse the structural tokens out of the raw output.documents= kwarg is reachable from the client via chat_template_kwargs:1client.chat.completions.create(
2 model="occ-ai/OCC-RAG-0.6B",
3 messages=[{"role": "user", "content": question}],
4 extra_body={"chat_template_kwargs": {"documents": documents}},
5)1@misc{savkin2026occragoptimalcognitivecore,
2 title = {OCC-RAG: Optimal Cognitive Core for Faithful Question Answering},
3 author = {Maksim Savkin and Mikhail Goncharov and Alexander Gambashidze and Alla Chepurova and Dmitrii Tarasov and Nikita Andriianov and Daria Pugacheva and Vasily Konovalov and Andrey Galichin and Ivan Oseledets},
4 year = {2026},
5 eprint = {2606.00683},
6 archivePrefix = {arXiv},
7 primaryClass = {cs.CL},
8 url = {https://arxiv.org/abs/2606.00683}
9}