Skip to content

Adds support for multiple sample generation with temperature - #220

Merged
aaishwarymishra merged 4 commits into
mainfrom
feat/generate-helpers
Nov 24, 2026
Merged

aaishwarymishra merged 4 commits into
mainfrom
feat/generate-helpers

Conversation

@aaishwarymishra

Copy link
Copy Markdown
Member

Summary

AI usage

Writing tests

Adds support for multiple sample generation with temperature

  • No AI tools were used for this contribution
  • AI tools were used to assist this contribution

Tool(s) and usage:

Human Submission Confirmation

  • This PR was manually reviewed, committed, and submitted by a human contributor (not an automated agent)

Testing

  • Tests added or updated where needed
  • Existing tests and checks pass
  • Documentation updated if needed

generate's logits[:, -1] decoding requires left-aligned rows, so the
caller-owned padding contract was leaky; generate now takes a list of
variable-length prompts and pads plus masks internally. Token selection
and multi-sample expansion live in generate too.

BREAKING CHANGE: generate(prompts, max_new_tokens, temperature=None,
num_samples=1) replaces generate(input_ids, max_new_tokens,
attention_mask, temperature).
@netlify

netlify Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for trainite ready!

Name Link
🔨 Latest commit 72bf640
🔍 Latest deploy log https://app.netlify.com/projects/trainite/deploys/6b056b76006af670720f128d
😎 Deploy Preview https://deploy-preview-220--trainite.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

inference_temperature and inference_samples_per_prompt expose generate's
sampling knobs to training logs; defaults keep greedy single-sample
behavior.
@aaishwarymishra
aaishwarymishra merged commit d005648 into main Nov 24, 2026
11 checks passed
@aaishwarymishra
aaishwarymishra deleted the feat/generate-helpers branch November 24, 2026 10:52
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.

1 participant