-
Notifications
You must be signed in to change notification settings - Fork 47
Add logic to handle encoder-only llama models #53
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
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.
Pull request overview
This PR adds support for detecting and handling encoder-only language models (like BERT) in the LlamaLanguageModel implementation. The changes prevent text generation attempts with encoder-only models by introducing early detection and proper error handling, while also adding logic to support encoder-decoder models (like T5).
Key changes:
- Added new
encoderOnlyModelerror case to properly reject text generation for encoder-only models - Implemented encoder/decoder model type detection using llama.cpp API functions
- Added separate code paths for encoder-decoder models vs standard decoder-only models with proper token handling
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fd1c791 to
9747a25
Compare
Related to #51