Jakal-au commited on
Commit
aca5519
·
verified ·
1 Parent(s): 92005e4

Add RLM long-context note

Browse files

Public note for the local RLM long-context result.

Files changed (1) hide show
  1. POST-rlm-local-longcontext.md +64 -0
POST-rlm-local-longcontext.md ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Recursive Language Models on a local 35B: a long-context test on dual RTX PRO 4000 (Blackwell)
2
+
3
+ Short version: on a pair of RTX PRO 4000 Blackwell desktop GPUs, wrapping a local quantised 35B in
4
+ the Recursive Language Models (RLM) inference scaffold made it much more reliable at answering
5
+ questions from long documents. The gain comes from letting the model search its context with code,
6
+ not from deep recursion, which fired but did not help on my tests. All local, no frontier API.
7
+
8
+ ## Setup
9
+
10
+ - GPUs: 2x RTX PRO 4000 Blackwell (desktop variant, 24 GB GDDR7 each, 48 GB total, no NVLink).
11
+ - Model: Qwen3.6-35B-A3B (Q4_K_M GGUF), served by llama.cpp's OpenAI-compatible server, 131,072-token
12
+ context, layer-split across both cards.
13
+ - Technique: RLM (Zhang, Kraska, Khattab; arXiv 2512.24601; github.com/alexzhang13/rlm), using the
14
+ library's OpenAI backend pointed at my local server, with the code REPL running in a Docker sandbox.
15
+ - The paper's experiments used frontier API models (GPT-5 / GPT-5-mini) as the RLM root. I wanted to
16
+ know how RLM behaves when the root is a local quantised 35B on 24 GB workstation cards. I could not
17
+ find existing numbers for that, so here are mine.
18
+
19
+ ## What I tested
20
+
21
+ A plain baseline (the long document placed directly in the prompt, one call) versus the RLM-wrapped
22
+ model, on the same questions:
23
+
24
+ - 100 long-context QA items from OOLONG-synth (two disjoint slices of 50), with contexts up to about
25
+ 34,000 whitespace-delimited words, comfortably inside the model's context window.
26
+ - One synthetic item of about 166,000 words, well beyond the 131k-token window, with the answer placed
27
+ past the truncation point.
28
+
29
+ Scoring was deterministic matching against the answer key, hand-checked on the baseline's misses.
30
+
31
+ ## Results
32
+
33
+ - In-window: the plain baseline got 37 of 100 right (37%). The RLM-wrapped model got 95 of 100 (95%).
34
+ Same model, same questions; the only difference is that RLM let it search and read the context with
35
+ code instead of swallowing the whole thing at once. The gap held across two disjoint 50-item slices
36
+ (baseline 38% then 36%, RLM 94% then 96%), so it is not a block-specific fluke.
37
+ - Beyond-window: RLM answered the ~166k-word item by working through it in pieces. The plain baseline
38
+ could not, because the document does not fit the window.
39
+ - Recursion: the deeper mode, where the model spawns child calls to break a task down, did fire when I
40
+ built items to force it (15 sub-calls at depth 2). But on that small, hard probe it scored worse than
41
+ the plain approach (1 of 5 versus 3 of 5). So the uplift here is from the REPL-over-context
42
+ mechanism, not from nested recursion. With a local Q4 35B, recursion switched on but did not earn its
43
+ keep on these tasks.
44
+ - Speed: RLM is somewhat slower per question because it makes several passes over the context, but it
45
+ stayed in a practical range for offline document work.
46
+
47
+ ## What this is and is not
48
+
49
+ - One model on one hardware setup, on a public benchmark slice plus one synthetic stress item.
50
+ - OOLONG-synth is public, so some contamination is possible, but it would lift both the baseline and
51
+ RLM equally, so it does not explain the gap between them.
52
+ - The recursion result rests on only 5 hard items, so read it as directional, not settled.
53
+ - Whether recursion helps with a stronger root model is outside the scope of this note; these numbers
54
+ are specifically for a local quantised 35B.
55
+
56
+ ## Why it might matter
57
+
58
+ If you run local and care about long-context reliability, this is a cheap lever: an open inference
59
+ scaffold turned a 37% baseline into 95% on long-document QA, on 24 GB workstation cards, with no
60
+ frontier API and no extra VRAM. The model's own long window already exists; RLM made it more reliable
61
+ inside that window and let it reach past it.
62
+
63
+ Credit to the RLM authors for the technique and the library. The setup and method above are enough to
64
+ reproduce.