Skip to content

Conversation

@joelpaulkoch
Copy link
Contributor

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.

Copy link
Member

@jonatanklosko jonatanklosko left a 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 :)

@joelpaulkoch
Copy link
Contributor Author

The implementation is basically llama + NoPE support (in the transformer block) + architectures that are supported but missing in llama (i.e. :for_question_answering and :for_token_classification). So, would you prefer to add the optional NoPE support and architectures in the llama implementation and map smollm3 to llama?

@jonatanklosko
Copy link
Member

So, would you prefer to add the optional NoPE support and architectures in the llama implementation and map smollm3 to llama?

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 :)

Comment on lines +27 to +33
Nx.tensor([
[
[0.256240, -0.424804, -0.137127],
[-0.806056, -0.141523, 0.364655],
[-0.407146, -1.018769, -1.137962]
]
]),
Copy link
Member

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.

Suggested change
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]
]
]),

Comment on lines +34 to +35
atol: 1.0e-3,
rtol: 1.0e-3
Copy link
Member

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?

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