McGill-NLP / llm2vec

Code for 'LLM2Vec: Large Language Models Are Secretly Powerful Text Encoders'
https://mcgill-nlp.github.io/llm2vec/
MIT License
1.31k stars 95 forks source link

Sentence/document classification #125

Closed versae closed 2 months ago

versae commented 4 months ago

Hi, congrats on the project! I'm finding it very useful.

Is there a script to also do whole document or sentence classification in the same way you have one for whole word classification?

Cheers.

vaibhavad commented 3 months ago

Hi @versae,

thanks for your interest in our work. We have a sentence classification example present here.

vaibhavad commented 2 months ago

Closing as it is stale. Feel free to re-open if the issue persists.

versae commented 2 months ago

Hi @vaibhavad, thank to responding.

I was actually referring to a script to do the training (fine-tuning?) of the model with an extra layer in the same fashion you folks do in experiments/run_word_task.py. The example you mention in examples/classification.py trains a scikit-learn classifier, which is not what I'm looking for.

Cheers.