Feature Extraction
Transformers
PyTorch
Safetensors
Hebrew
bert
custom_code
text-embeddings-inference
Instructions to use dicta-il/dictabert-lex with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dicta-il/dictabert-lex with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="dicta-il/dictabert-lex", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("dicta-il/dictabert-lex", trust_remote_code=True) model = AutoModel.from_pretrained("dicta-il/dictabert-lex", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Extract the last layer of the model
#1
by yaakov-tayeb - opened
Hi Author,
How can I extract, in addition to the model predictions, the last layer of the model.
To be more specifically, since this is a Bert structure model,
- How can I extract the Output hidden state corresponding to [CLS] ?
- How can I extract the Output hidden state of every other token ?
Thanks a lot!
Hi Yaakov!
This model was finetuned on top of the base model DictaBERT.
Using the base model, you can achieve what you want. The model is available here: https://huggingface.co/dicta-il/dictabert