-
Notifications
You must be signed in to change notification settings - Fork 116
Add SmolLM3 #422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add SmolLM3 #422
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @joelpaulkoch, this looks great! I dropped a few small comments and it's good to go :)
|
The implementation is basically llama + NoPE support (in the transformer block) + architectures that are supported but missing in llama (i.e. |
It's separate in hf/transformers, so I would keep it separate here to for consistency. Also, I wouldn't necessarily add features to llama that are not in the hf/transformers implementation, otherwise it's harder to analyse for parity :) |
| Nx.tensor([ | ||
| [ | ||
| [0.256240, -0.424804, -0.137127], | ||
| [-0.806056, -0.141523, 0.364655], | ||
| [-0.407146, -1.018769, -1.137962] | ||
| ] | ||
| ]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: we typically only include 4 decimal places, since the further ones are not relevant for the precision we compare with anyway.
| Nx.tensor([ | |
| [ | |
| [0.256240, -0.424804, -0.137127], | |
| [-0.806056, -0.141523, 0.364655], | |
| [-0.407146, -1.018769, -1.137962] | |
| ] | |
| ]), | |
| Nx.tensor([ | |
| [ | |
| [0.2562, -0.4248, -0.1371], | |
| [-0.8060, -0.1415, 0.3646], | |
| [-0.4071, -1.0187, -1.1379] | |
| ] | |
| ]), |
| atol: 1.0e-3, | ||
| rtol: 1.0e-3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is unusual, pretty much all other LLMs work with the default atol 10e-4. If the numbers are slightly off like that, it often indicates a small difference, like a missing layer norm, layer norm in a different order, or something like that.
Do you know if that deviation is only for the test models, or is it similar for any real checkpoint?
Hey, this is the SmolLM3 model from huggingface. It's smol, fully open and supports reasoning, so I figured it would be a nice addition to bumblebee.
I didn't implement YaRN extrapolation.