Update README with token match rate using ChatML template#50
Open
sdeeptan-aws wants to merge 1 commit intoaws-neuron:mainfrom
Open
Update README with token match rate using ChatML template#50sdeeptan-aws wants to merge 1 commit intoaws-neuron:mainfrom
sdeeptan-aws wants to merge 1 commit intoaws-neuron:mainfrom
Conversation
aws-yishanm
reviewed
Feb 20, 2026
aws-yishanm
left a comment
There was a problem hiding this comment.
Approved because Readme and test were present.
aws-yishanm
reviewed
Feb 20, 2026
aws-yishanm
left a comment
There was a problem hiding this comment.
Approved because Readme and test were present.
aws-yishanm
approved these changes
Feb 20, 2026
aws-yishanm
left a comment
There was a problem hiding this comment.
Approved because Readme and test were present.
petesraj-aws
approved these changes
Feb 23, 2026
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.
Description
Updated LFM2-2.6B contrib model README with 100% token match accuracy using ChatML prompt template. LFM2 is a state space model from Liquid AI — architecturally different from standard transformers but validates using the same NeuronX methodology. The key fix was applying the ChatML template (
<|im_start|>user\n...<|im_end|>\n<|im_start|>assistant\n) which the instruct-tuned model requires for accurate token matching against the HuggingFace reference. Without the template, the model generates coherent, factually correct text but tokens diverge from HF output.Model Information
Model Name: LFM2-2.6B
Model Architecture: Decoder-only state space model (Llama-based registration, 30 layers, hidden_size=2048, GQA 32Q/8KV, SwiGLU)
Purpose: Text generation
Checklist
Required Components
test/integration/test_model.py)src/)Optional Components
Folder Structure
Testing
Model was compiled and tested with TP=1, batch_size=1, seq_len=2048, bfloat16. Two key validation findings:
<|im_start|>format for token matching — without it, outputs are valid but diverge from HF referenceTest Results:
Compatibility
Tested with:
Additional Information
<|im_start|>user\n{text}<|im_end|>\n<|im_start|>assistant\nRelated Issues
N/A
vLLM Integration
By submitting this PR, I confirm that: