--- base_model: Qwen/Qwen3.5-2B library_name: peft license: apache-2.0 pipeline_tag: text-generation language: - en datasets: - hotpotqa/hotpot_qa tags: - grpo - lora - reinforcement-learning - small-model - on-device - surogate - cetusian - action-fleet model-index: - name: sonorca-2b results: - task: type: text-generation name: multi-hop question answering through tool calls dataset: name: hotpotqa hard (300 held-out) type: hotpotqa metrics: - type: f1 name: answer f1 value: 63.6 --- ![sonorca-2b](https://huggingface.co/cetusian/sonorca-2b/resolve/main/cover.png) # sonorca-2b **unit ct-20 · the deep diver** · 鯨 *(whale)* > pings a private pile of 22,000 documents with searches, opens what echoes back, joins two facts, answers. offline. ## spec plate | | | |---|---| | unit | `ct-20` · 2b | | frame | `DA-24` · qwen3.5 hybrid · 24 layers in a 3:1 rhythm: 18 gated deltanet (fast running memory) + 6 full attention (the deep look back), width 2048 | | job | answers multi-hop questions by searching a private document collection: search, read, search again, then answer. nothing leaves the machine. | | held-out questions | 300 hotpotqa hard questions (validation split, never seen in training) | | before → after | 26.0% → **63.6%** answer f1 | | training | 40 grpo steps · one l40s · about 1 h | | recipe | lora r16 · lr 5e-5, cosine to a tenth · 16 questions × 8 rollouts · up to 8 turns of 512 tokens | | tools | `search` (bm25, top 5 titles with opening words) and `open_document` (one paragraph, by title) | | datasets | [hotpotqa](https://huggingface.co/datasets/hotpotqa/hotpot_qa) (cc by-sa 4.0), distractor setting: every paragraph of every question pooled into one 22,184-document collection | **reward:** hotpotqa answer f1 on the text inside ``: a short right answer earns 1, a padded one earns part, so a list of guesses scores low. yes or no counts only when exact. ## real jobs | | | |---|---| | **research over your own documents** | search and read a private collection, offline, with the trail of what it opened. | | **due diligence on a laptop** | questions that need two sources joined, without sending the documents anywhere. | | **a template for search agents** | the retriever is plain bm25 in the standard library. swap in your documents and questions and retrain. | ## mission log > **who set nietzche's philosophical novel to music?** > > before: 8 tool calls. out of turns. no answer. > > after: searched, opened *also sprach zarathustra*, searched the composer. "richard strauss". > **how many grands prix wins did the formula one driver from brazil that holds the record for the most races contested score?** > > before: answered from memory: "rubens barrichello. he scored **2** grand prix wins." (it's 11) > > after: opened *formula one drivers from brazil*, then searched barrichello's wins. "11". > **what giant silverware company was started as a religious utopian group and was for many years run by pierrepont noyes?** > > before: "the oneida silverware company … founded in 1880 by john humphrey noyes …" a paragraph, half of it made up. > > after: two searches, opened *oneida community*. "oneida limited". ## receipts | | answer f1 (300 held-out) | |---|---| | base qwen3.5-2b | 26.0% | | step 10 | 49.6% | | step 20 | 58.6% | | step 30 | 61.4% | | **step 40 (this one)** | **63.6%** | greedy decoding, same prompt and budget as training, one run. **outside check.** served outside the training engine (transformers + peft, greedy), the kit's own tools, collection and scorer, the first 12 held-out questions: base 15.7% → adapter 65.3% answer f1. full marks on 7 of 12, base on none. ## scars - **one search is not enough.** searching with the raw question finds both paragraphs a question needs only 51% of the time. a model that answers after one search is guessing half the time, so it has to learn to read and search again. - **it crashed the engine before it trained.** long multi-turn prompts at high concurrency overflowed a prefill lane set on 1.5.16. fixed in [#381](https://github.com/invergent-ai/surogate/pull/381); this kit needs 1.5.17 or later. ## pilot's manual ```python from transformers import AutoModelForCausalLM, AutoTokenizer from peft import PeftModel tok = AutoTokenizer.from_pretrained("Qwen/Qwen3.5-2B") base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-2B", torch_dtype="bfloat16") model = PeftModel.from_pretrained(base, "cetusian/sonorca-2b") ``` pass the two tools (`search`, `open_document`) with `tools=` and `enable_thinking=False`, and run the tool loop yourself. the environment file has both tools and the system prompt; swap the collection for your own documents. ## weak spots - **sometimes calls a tool named `answer` that doesn't exist** instead of writing ``. it did on 3 of the 12 questions above and ran out of turns. if you run the loop yourself, treat an `answer` call as the answer. - one collection of short wikipedia paragraphs. long documents are cut to 1,500 characters when opened. - f1 pays for word overlap: a right answer in other words scores low. - still rising at step 40. a longer run may score higher. - one run, one seed. ## hangar built on one gpu with the [surogate engine](https://github.com/invergent-ai/surogate) (apache-2.0): `surogate grpo-colocate`, trainer and inference sharing the card. the whole kit (configs, environment, reward, walkthrough) is open, so you can rebuild this unit yourself or point it at your own task → [docs.surogate.ai/engine/examples/kits/research](https://docs.surogate.ai/engine/examples/kits/research/) ## action fleet | unit | | job | before → after | status | |---|---|---|---|---| | [pocket-atlas-0.8b](https://huggingface.co/cetusian/pocket-atlas-0.8b) | `ct-00` | explains anything, offline | — | the elder | | [corvex-0.8b](https://huggingface.co/cetusian/corvex-0.8b) | `ct-08` | countdown arithmetic | 1% → 69.5% | active | | [mantix-0.8b](https://huggingface.co/cetusian/mantix-0.8b) | `ct-08` | phone requests → function calls | 74.2% → 85.3% | active | | [sentrikat-0.8b](https://huggingface.co/cetusian/sentrikat-0.8b) | `ct-08` | content-policy guard | 54.4% → 78.1% | active | | [spinnex-0.8b](https://huggingface.co/cetusian/spinnex-0.8b) | `ct-08` | documents → json | 67.6% → 87.8% | active | | [octorig-2b](https://huggingface.co/cetusian/octorig-2b) | `ct-20` | agent on an mcp server | 48.4% → 81.5% | active | | **sonorca-2b** | `ct-20` | offline deep research | 26.0% → 63.6% f1 | active | --- *i teach tiny models to do big things. sometimes they listen.* · [cetusian](https://huggingface.co/cetusian)