Skip to content

Add NeoBERT #14164

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Add NeoBERT #14164

wants to merge 5 commits into from

Conversation

huydt84
Copy link
Collaborator

@huydt84 huydt84 commented Jun 13, 2025

Support NeoBERT

@github-actions github-actions bot added the python python script changes label Jun 13, 2025
Comment on lines +531 to +532
if self.model_arch == gguf.MODEL_ARCH.NEO_BERT:
n_ff = int(2 * n_ff / 3) # NeoBERT uses 2/3 of the intermediate size as feed forward length
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the right place to override this. Move it to the NeoBert class

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's problematic as you can't use the base method then without getting duplicate keys, alternatively, just deactivate setting this value here, similar to the head_dim workaround for DeepSeekV3.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. In any case we should try to avoid stacking up special cases here in some way. Maybe add a function that allows to override existing keys?

Copy link
Collaborator

@CISC CISC Jun 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add an override option to the GGUFWriter methods I suppose.

huydt84 and others added 2 commits June 14, 2025 07:48
Co-authored-by: Georgi Gerganov <[email protected]>
Co-authored-by: Georgi Gerganov <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python python script changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants