Skip to content

fix: honor zero-valued constructor seeds - #2444

Open
remote-controlled-man wants to merge 2 commits into
abetlen:mainfrom
remote-controlled-man:codex/prflow-f8924d432c2d
Open

remote-controlled-man wants to merge 2 commits into
abetlen:mainfrom
remote-controlled-man:codex/prflow-f8924d432c2d

Conversation

@remote-controlled-man

Copy link
Copy Markdown
Contributor

Llama(seed=0) replaced the valid seed with LLAMA_DEFAULT_SEED. Preserve zero and retain the existing fallback for None. Found by code inspection and reproduced with the real stories15M-q4_0 model: the saved seed was 4294967295 and generated tokens differed from set_seed(0).

The regression compares saved state and 16 generated tokens for seeds 0 and 1337. The old implementation fails the zero case; both cases pass after the fix.

Validation on macOS arm64 / Python 3.12.14:

  • make test: 28 passed, none skipped.
  • make lint: lint and formatting checks passed.

AI assistance: OpenAI Codex investigated, implemented, and tested this change; a separate agent independently reviewed it.

Copilot AI balanced review requested due to automatic review settings November 24, 2026 06:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

This branch has not been deployed

No deployments
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