Skip to content

Eight earlier messages in the prompt (integration 88 to 90 of 96), and train_base / shared-model groundwork - #18

Merged
FMXExpress merged 5 commits into
mainfrom
claude/optimistic-allen-i3bd3d
Nov 9, 2026
Merged

FMXExpress merged 5 commits into
mainfrom
claude/optimistic-allen-i3bd3d

Conversation

@FMXExpress

@FMXExpress FMXExpress commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

List questions such as "What has Melanie painted?" have their answer spread over several turns. The prompt held the top 3 of 8 retrieved messages, so most items never reached the model. The full write-up is in bench/README.md, in the section "More earlier messages for questions whose answer spans turns".

Change

  • New settings [retrieval] msg_pool (default 30) and msg_k (default 8). They control how many message candidates the reranker scores, and how many earlier messages go into the prompt.
  • Facts keep pool and rag_k, unchanged.

Measured

Evidence found, without the model. LoCoMo sample 0, share of LoCoMo's evidence turns that reach the prompt (bench/locomo_recall.py, new probe memagent/tests/msg_probe.lpr):

multi-hop single-hop open-domain temporal
top 3 of 8 (before) 0.25 0.57 0.14 0.76
top 8 of 30 0.42 0.72 0.27 0.78

LoCoMo with the model. 1.5B, all 152 questions (locomo-small-s0-msgk.json):

multi-hop temporal open-domain single-hop mean of four all
3 messages 0.143 0.331 0.080 0.266 20.5 24.0
8 messages 0.141 0.347 0.073 0.282 21.1 25.0
  • Multi-hop F1 is flat, but the answers contain more of what was asked. The share of the expected answer's words found in the reply went from 0.25 to 0.33. The answers also got longer (13 to 22 words), and token F1 penalises the extra words.
  • Integration benchmark, 1.5B: 90 of 96, up from 88 (integration-small-msgk.json).
  • Cost: answers are slower on CPU, about 1.6× per LoCoMo question and 1.26× on the integration run.

Also merged here: the first single-GPU commit (cb767f6)

These were unmeasured when this PR was merged, and both are off by default.

  • [consolidate] train_base = f32 | model. With model, the llama trainer runs on the GGUF as loaded instead of an f32 copy.
  • LlamaLoadModel shares one loaded copy per file and device. [gpu] train defaults to [gpu] infer when unset.

The later commits never landed in this PR, because it was merged before they were pushed: the llama.cpp patch, the measurements, the end-to-end test and the docs. They go in a follow-up PR.

Test plan

  • make and make test-pascal pass
  • bench/locomo_recall.py on sample 0
  • LoCoMo sample 0, all 152 questions
  • Integration benchmark, 1.5B: 90/96

🤖 Generated with Claude Code

https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn

…whose answer spans several turns

On LoCoMo sample 0 the top 3 of 8 messages held 25% of the multi-hop evidence
turns, the top 8 of 30 hold 42% (bench/locomo_recall.py, build/msg_probe).
New [retrieval] msg_pool and msg_k; facts keep pool and rag_k.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
…ded model between chat and trainer

[consolidate] train_base = f32 (default, unchanged) | model. With model the llama
trainer runs on the GGUF as it is instead of a full-precision copy (108 GB for a
27B at 4 bits). LlamaLoadModel now shares one copy per file and device, so with
train_base = model on the chat engine's device the trainer uses the engine's
weights. [gpu] train defaults to [gpu] infer when unset. Not yet measured.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01NPVFJHeBeotAKkU7EPbTgn
@FMXExpress
FMXExpress merged commit 9b79c3a into main Nov 9, 2026
3 checks passed
@FMXExpress FMXExpress changed the title Eight earlier messages in the prompt for answers that span several turns (integration 88 to 90 of 96) Eight earlier messages in the prompt (integration 88 to 90 of 96), and groundwork for one GPU doing chat and training Nov 9, 2026
@FMXExpress FMXExpress changed the title Eight earlier messages in the prompt (integration 88 to 90 of 96), and groundwork for one GPU doing chat and training Eight earlier messages in the prompt (integration 88 to 90 of 96), and train_base / shared-model groundwork Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants