deeppavlov / deeppavlov/AutoIntent
Pooling methods for cross-encoder
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 54
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
Я говорю про то чтобы не использовать _classifier_hook можно просто сделать SentenceTranformer, а не CrossEncoder
причины почему мы используем хук:
* это работает :) * нам нужно использовать один трансформер в двух режимах в зависимости от флага `train_classifier`: с претренированной головой и со своей кастомнойПретренированную голову точно можно ипользовать с помощью
CrossEncoder.predict(), а о том что ее можно использовать и с помощью какого-то метода классаSentenceTransformerмне неизвестно. Если это и можно сделать, то наверное это что-то экзотическое и не задокументировано в самой библиотекеsentence_transformers
Да, нельзя использовать доп голову. Просто сейчас у нас реализован получение эмбеда из 0 токена (предположим, что это CLS) но не все модели обучались с ним и не факт, что это хорошо работать будет
Originally posted by @Samoed in https://github.com/deeppavlov/AutoIntent/issues/88#issuecomment-2585304933
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the CrossEncoder.predict() and SentenceTransformer usage, then trace the _classifier_hook path and the train_classifier flag. Compare the current embedding from token 0 with the pooling methods that need to be supported; done should define and implement the intended pooling behavior without relying on an assumed CLS token.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100