Implement reusable code snippets for documentation#55
Merged
Conversation
Create 6 JSX snippet components for text and vision model quick starts (Transformers, vLLM, llama.cpp). Add MODEL-MATRIX.md as maintainer source-of-truth, excluded from Mintlify via .mintignore. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace inline Quick Start code on 9 text model pages with shared snippet components, ensuring consistent code examples across all pages. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace inline Quick Start code on 4 VL model pages with shared snippet components for Transformers, vLLM, and llama.cpp. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Standardize install commands: transformers>=5.0.0, accelerate, vllm==0.14. Replace huggingface-cli download with hf download. Add dtype and model_id variable pattern to base model page. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dtype is the new correct parameter name for from_pretrained(). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
58023c9 to
fdfecff
Compare
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Collaborator
|
Nice, I like the reusable approach |
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.
Summary
Eliminated code drift between model pages and main inference documentation by implementing reusable JSX snippet components and standardizing code examples across the entire codebase.
Changes
snippets/quickstart/) for text & vision models (Transformers, vLLM, llama.cpp)transformers>=5.0.0,hf download,vllm==0.14)torch_dtype→dtypeacross inference pages (new correct parameter name).mintignore)All code examples now match main inference pages exactly (same install commands, version pins, code patterns, parameter values).
Verification
mintlify dev(HTTP 200, no errors)Note on Styling
Reusable JSX snippets have slightly simplified styling vs. native fenced code blocks (no token-level syntax highlighting, no copy button), but maintain consistent visual frame and correctly interpolate model IDs. This is a necessary trade-off for achieving parameterized snippets since Mintlify's
{variable}interpolation doesn't work inside fenced code blocks.🤖 Generated with Claude Code