Skip to main content
19 votes
3 answers
27k views

I'm trying to get sentence vectors from hidden states in a BERT model. Looking at the huggingface BertModel instructions here, which say: from transformers import BertTokenizer, BertModel tokenizer = ...
Mittenchops's user avatar
141 votes
8 answers
249k views

The default cache directory lacks disk capacity, I need to change the configuration of the default cache directory. How can I do that?
Ivan Lee's user avatar
  • 4,431
0 votes
2 answers
7k views

I have some custom data set with custom table entries and wanted to deal with it with a custom collate. But it didn't work when I pass a collate function I wrote (that DOES work on a individual ...
Charlie Parker's user avatar
12 votes
7 answers
15k views

tldr; what I really want to know is what is the official way to set pad token for fine tuning it wasn't set during original training, so that it doesn't not learn to predict EOS. colab: https://colab....
Charlie Parker's user avatar
77 votes
6 answers
291k views

From the documentation for from_pretrained, I understand I don't have to download the pretrained vectors every time, I can save them and load from disk with this syntax: - a path to a `directory` ...
Mittenchops's user avatar
22 votes
10 answers
90k views

I am facing below issue while loading the pretrained BERT model from HuggingFace due to SSL certificate error. Error: SSLError: HTTPSConnectionPool(host='huggingface.co', port=443): Max retries ...
Nikita Malviya's user avatar
17 votes
4 answers
29k views

Is there any way of getting sentence embeddings from meta-llama/Llama-2-13b-chat-hf from huggingface? Model link: https://huggingface.co/meta-llama/Llama-2-13b-chat-hf I tried using transfomer....
Mukesh Reddy's user avatar
14 votes
2 answers
28k views

I am trying to fine-tune the BERT language model on my own data. I've gone through their docs, but their tasks seem to be not quite what I need, since my end goal is embedding text. Here's my code: ...
Rahul's user avatar
  • 1,276
13 votes
4 answers
14k views

I've been looking to use Hugging Face's Pipelines for NER (named entity recognition). However, it is returning the entity labels in inside-outside-beginning (IOB) format but without the IOB labels. So ...
Union find's user avatar
  • 8,280
5 votes
4 answers
10k views

this: import tensorflow as tf from transformers import BertTokenizer, TFBertForSequenceClassification model = TFBertForSequenceClassification.from_pretrained("bert-base-uncased") Outputs ...
zest16's user avatar
  • 689
4 votes
3 answers
16k views

I want all special tokens to always be available. How do I do this? My first attempt to give it to my tokenizer: def does_t5_have_sep_token(): tokenizer: PreTrainedTokenizerFast = AutoTokenizer....
Charlie Parker's user avatar
134 votes
9 answers
155k views

Running the below code downloads a model - does anyone know what folder it downloads it to? !pip install -q transformers from transformers import pipeline model = pipeline('fill-mask')
user3472360's user avatar
  • 2,215
74 votes
5 answers
112k views

I use pytorch to train huggingface-transformers model, but every epoch, always output the warning: The current process just got forked. Disabling parallelism to avoid deadlocks... To disable this ...
snowzjy's user avatar
  • 851
14 votes
2 answers
14k views

I’m trying to train BERT model from scratch using my own dataset using HuggingFace library. I would like to train the model in a way that it has the exact architecture of the original BERT model. In ...
tlqn's user avatar
  • 399
9 votes
2 answers
6k views

Given a simple neural net in Pytorch like: import torch.nn as nn net = nn.Sequential( nn.Linear(3, 4), nn.Sigmoid(), nn.Linear(4, 1), nn.Sigmoid() ).to(device) How do I ...
alvas's user avatar
  • 123k

15 30 50 per page
1
2 3 4 5
18