Repository navigation
server: learn a past example: /learn's messages form serves its prompt through the ordinary completion path first, then steps - #89
Open
joelteply wants to merge 1 commit into
Conversation
…t through the ordinary completion path first, then steps
A reviewed correction settles minutes or hours after its turn, when her
slot no longer holds that prompt, and /learn refused it ("serve the prompt
again, then learn"); the dream had no way to learn a past example
(continuum S4 (f), card 13b76412; Fable's finding (f) on the S4 map).
- The messages form of /learn now becomes a completion of the served
prompt, one token, carrying the template-rendered reply as its learn and
marked learn_only. update_slots serves it as it serves anything (the
slot's own admission, the prompt cache, its checkpoints), and
learn_if_asked steps as it finishes; send_final_response returns the
learn outcome as its whole reply. When the slot still holds the prompt
the cache makes this free; when not, it is one prefill. One prefill
path, one learn path; the slot is the caller's choice (whose cached
prompt it replaces). The token forms (reply_tokens / reply after
n_prefix), which carry no prompt, keep requiring the slot to hold it.
- The lost-reply binding (#88) is unchanged: the step still names its
execution, base, engine and input.
Tests (IntelMac CPU, Qwen2.5-0.5B, --jinja, fresh servers):
learn-every-format.py --past-example serves an unrelated prompt on the
slot, then learns a conversation it does not hold (step 1, 11 labels, loss
2.093), then learns it again with the whole 37-token prompt kept from
cache (step 2, loss 1.299); --template-replies (text and tool-call replies
learn, the reasoning reply refused as expected) still passes.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A reviewed correction settles minutes or hours after its turn, when her
slot no longer holds that prompt, and /learn refused it ("serve the prompt
again, then learn"); the dream had no way to learn a past example
(continuum S4 (f), card 13b76412; Fable's finding (f) on the S4 map).
prompt, one token, carrying the template-rendered reply as its learn and
marked learn_only. update_slots serves it as it serves anything (the
slot's own admission, the prompt cache, its checkpoints), and
learn_if_asked steps as it finishes; send_final_response returns the
learn outcome as its whole reply. When the slot still holds the prompt
the cache makes this free; when not, it is one prefill. One prefill
path, one learn path; the slot is the caller's choice (whose cached
prompt it replaces). The token forms (reply_tokens / reply after
n_prefix), which carry no prompt, keep requiring the slot to hold it.
execution, base, engine and input.
Tests (IntelMac CPU, Qwen2.5-0.5B, --jinja, fresh servers):
learn-every-format.py --past-example serves an unrelated prompt on the
slot, then learns a conversation it does not hold (step 1, 11 labels, loss
2.093), then learns it again with the whole 37-token prompt kept from
cache (step 2, loss 1.299); --template-replies (text and tool-call replies
learn, the reasoning reply refused as expected) still passes.
Co-Authored-By: Claude Opus 5.5 (1M context) noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01FRQWzgSfo79JtnwZywHKrE