Skip to content

Conversation

@mattt
Copy link
Owner

@mattt mattt commented Dec 10, 2025

Related to #51

Copy link

Copilot AI left a 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 encoderOnlyModel error 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.

Copy link

Copilot AI left a 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.

@mattt mattt force-pushed the mattt/llama-detect-encoder-only branch from fd1c791 to 9747a25 Compare December 10, 2025 17:41
@mattt mattt merged commit a48cf2e into main Dec 10, 2025
3 checks passed
@mattt mattt deleted the mattt/llama-detect-encoder-only branch December 10, 2025 17:51
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