The huggingface tag can be used for all libraries made by Hugging Face. Please ALWAYS use the more specific tags; huggingface-transformers, huggingface-tokenizers, huggingface-datasets if your question concerns one of those libraries.
Questions tagged [huggingface]
606 questions
2
votes
1 answer
How to customize the positional embedding?
I am using the Transformer model from Hugging face for machine translation. However, my input data has relational information as shown below:
I want to craft a graph like the like the following:
________
| |
| \|/
He ended his meeting…

Exploring
- 2,493
- 11
- 56
- 97
2
votes
1 answer
Do weights of the [PAD] token have a function?
When looking at the weights of a transformer model, I noticed that the embedding weights for the padding token [PAD] are nonzero. I was wondering whether these weights have a function, since they are ignored in the multi-head attention layers.
Would…

Bas Krahmer
- 489
- 5
- 11
2
votes
1 answer
HuggingFace - Why does the T5 model shorten sentences?
I wanted to train the model for spell correction. I trained two models allegro/plt5-base with polish sentences and google/t5-v1_1-base with english sentences. Unfortunately, I don't know for what reason, but both models shorten the…

nietoperz21
- 303
- 3
- 12
2
votes
1 answer
Huggingface Load_dataset() function throws "ValueError: Couldn't cast"
My goal is to train a classifier able to do sentiment analysis in Slovak language using loaded SlovakBert model and HuggingFace library. Code is executed on Google Colaboratory.
My test dataset is read from this csv…

Sotel
- 23
- 1
- 5
2
votes
0 answers
Using huggingface's accelerate with 2GPUs and throwed an error:RuntimeError: Expected to mark a variable ready only once
I want to train BigBird with 2gpus, and I use huggingface's accelerate in notebook,so I use notebook_launcher.
I have followed the example in https://github.com/huggingface/notebooks/blob/main/examples/accelerate/simple_nlp_example.ipynb
and added…

Jie
- 45
- 3
2
votes
0 answers
List and delete cached models from HuggingFace
When using a new model from HuggingFace, the necessary files are downloaded to a .cache/huggingface/transformers folder. However, these files are named using id numbers rather than with names referring to the type of model.
I wonder how I can list…

John
- 309
- 3
- 12
2
votes
1 answer
KeyError: 'allocated_bytes.all.current'
Si I upload in huggingface spaces the VQGAN+CLIP code, the problem it that when I try to use it, it gives me this error.
I don't know what this means

Bernardo Olisan
- 665
- 7
- 20
2
votes
1 answer
Solving "CUDA out of memory" when fine-tuning GPT-2 (HuggingFace)
I get the reoccuring CUDA out of memory error when using the HuggingFace Transformers library to fine-tune a GPT-2 model and can't seem to solve it, despite my 6 GB GPU capacity, which I thought should be enough for fine-tuning on texts. The error…

Stimmot
- 999
- 1
- 7
- 22
1
vote
2 answers
How to load a huggingface dataset from local path?
Take a simple example in this website, https://huggingface.co/datasets/Dahoas/rm-static:
if I want to load this dataset online, I just directly use,
from datasets import load_dataset
dataset = load_dataset("Dahoas/rm-static")
What if I want to…

4daJKong
- 1,825
- 9
- 21
1
vote
0 answers
HuggingFace Space with Langchain and Gradio SDK: Why am I getting a FAISS-related error when I'm using Chroma, not FAISS?
I am building a HuggingFace Space with Langchain (Gradio SDK) to chat my data, cloning from Harrison Chase's Chat Your Data space and going from there. Fixed a deprecation issue (see Discussion), switched to a DirectoryLoader so I can ingest…

Leanna
- 107
- 9
1
vote
0 answers
Error when running a huggingface model in 4bit mode in Streamlit using bitsnbytes. Quant state is being set to None unwillingly
I am loading a huggingface starchat beta model in streamlit and caching it thus :
@st.cache_resource
def load_model():
"""Initialize the tokenizer and the AI model."""
tokenizer =…

Abhilash Pal
- 11
- 2
1
vote
0 answers
I am not able to use GPT4All with Streamlit
I am trying to use GPT4All with Streamlit in my python code, but it seems like some parameter is not getting correct values. I have tried every alternative. It looks a small problem that I am missing somewhere.
My code:
from langchain import…

user810258
- 31
- 4
1
vote
1 answer
How can BERT/Transformer models accept input batches of different sizes?
I understand that all inputs in a batch need to be of the same size. However, it seems BERT/Transformers models can accept batches with different sizes as input.
How is that possible? I thought we needed to pad all examples in a batch to…

The Wanderer
- 3,051
- 6
- 29
- 53
1
vote
0 answers
Save a LLM model after adding RAG pipeline and embedded model and deploy as hugging face inference?
I have created a RAG (Retrieval-augmented generation) pipeline and using it with a 4-bit quantized openllama 13b loaded directly from hugging face and without fine-tuning the model.
At first I need to save the model into local. But after using…

No Flag
- 11
- 3
1
vote
1 answer
AttributeError: ‘Dataset’ object has no attribute ‘remove_columns’ in hugging face
I want to remove column from Dataset Billsum from hugging face.
Error:
AttributeError: ‘Dataset’ object has no attribute ‘remove_columns’
I can't find any solution for this problem.. I have a headache from it
If someone can help me

jack wilson
- 25
- 3