Skip to content

Make it possible to use a transformer model as encoder.#2022

Open
robinp wants to merge 1 commit intoOpenNMT:masterfrom
robinp:feat-transformer-as-encoder
Open

Make it possible to use a transformer model as encoder.#2022
robinp wants to merge 1 commit intoOpenNMT:masterfrom
robinp:feat-transformer-as-encoder

Conversation

@robinp
Copy link

@robinp robinp commented Mar 3, 2026

For this, as_sequence_encoder() only considers the encoder half of the model.

This makes it possible to access the encoder embeddings of a transformer model, for experimentation purposes, without resorting to model file surgery.

TESTED=ran an encoder from python, akin to #1008 (comment)

For this, as_sequence_encoder() only considers the encoder half of the
model.

This makes it possible to access the encoder embeddings of a transformer
model, for experimentation purposes, without resorting to with model
file surgery.
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.

1 participant