Add LlamaForSequenceClassification (#22209)

* Add LlamaForSequenceClassification

* Update src/transformers/models/llama/modeling_llama.py

Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com>

* Update src/transformers/models/llama/modeling_llama.py

Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com>

* Add docstring

* Add test

* Add input embedding getter and setter

* Remove dead code

---------

Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com>
This commit is contained in:
lewtun
2023-03-17 14:39:26 +01:00
committed by GitHub
parent 675d2a5a00
commit f251441387
8 changed files with 183 additions and 36 deletions

View File

@@ -66,3 +66,8 @@ This model was contributed by [zphang](https://huggingface.co/zphang) with contr
[[autodoc]] LlamaForCausalLM
- forward
## LlamaForSequenceClassification
[[autodoc]] LlamaForSequenceClassification
- forward