Skip to content

Comments

Fix code examples: update API patterns and sampling parameters#70

Merged
ykhrustalev merged 3 commits intomainfrom
alay2shah/fix-code-snippets
Feb 25, 2026
Merged

Fix code examples: update API patterns and sampling parameters#70
ykhrustalev merged 3 commits intomainfrom
alay2shah/fix-code-snippets

Conversation

@alay2shah
Copy link
Contributor

@alay2shah alay2shah commented Feb 24, 2026

Summary

Fixed inconsistencies between docs, notebooks, and code snippets:

  • Updated Transformers examples to use return_dict=True and **inputs pattern for proper attention mask handling
  • Corrected sampling parameters in notebooks to match model card specifications (LFM2.5-1.2B-Instruct: temperature=0.1, top_k=50)
  • Added critical lm_head workaround for Transformers v5 vision model bug
  • Regenerated all quickstart MDX snippets from updated notebook sources to ensure consistency

All code examples now align across deployment guides, Colab notebooks, and quickstart snippets.

Mintlify

0 threads from 0 users in Mintlify

  • No unresolved comments

Open in Mintlify Editor

- Update transformers examples to use return_dict=True and **inputs pattern (from notebook)
- Fix sampling parameters in notebooks to match model card recommendations (LFM2.5-1.2B-Instruct: temp=0.1, top_k=50)
- Add lm_head workaround for transformers v5 vision model bug
- Regenerate quickstart snippets from updated sources to keep all examples in sync
@ykhrustalev
Copy link
Contributor

@alay2shah didn't notice this, #71

@ykhrustalev ykhrustalev merged commit 3a3e67d into main Feb 25, 2026
7 checks passed
@ykhrustalev ykhrustalev deleted the alay2shah/fix-code-snippets branch February 25, 2026 02:02
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