Questions tagged [huggingface]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
23 views

Fine-tuning Hugging Face’s Llama Model with Unlabelled Data from PDFs from niche domain

I’m unsure about the next steps. Specifically, I have the following questions: How can I prepare my unlabelled data for the fine-tuning process? What’s the best way to fine-tune the Llama model with ...
Divya Patel's user avatar
0 votes
0 answers
16 views

What happens when I set is_decoder to True in the bert API from huggingface?

Please help me understand the implications of initialising the bert model from huggingface with is_decoder parameter set to True ...
figs_and_nuts's user avatar
0 votes
1 answer
58 views

Open-Source Large Language Models (LLM): Your experience and recommendation

I’m looking for an open-source LLM for a new project. I want to use it for instructions and to fine-tune the model to a specific domain like legal and rights. Some LLMs are open-source, but they didn’...
Christian01's user avatar
0 votes
0 answers
11 views

F1 and Exact-Match (EM) Score in Extractive QA NLP

I have a question as to how the F1 should be calculated in NLP and whether the text normalization is optional or not. So I have been working on a project where we created a closed-domain extractive QA ...
tt40kiwi's user avatar
  • 101
0 votes
0 answers
30 views

How to use Bertweet model for topic modeling

The problem is implementation of Bertweet in a topic-modeling project with understandable output like BERTopic, i want to use it on a relatively large (20k tweets) unlabelled dataset to segment it ...
Rossin's user avatar
  • 1
0 votes
0 answers
217 views

How to get Llama-2 Rotary Embeddings?

I want to get the Llama-2 rotary embeddings. I do print(model) and get the following output: In the picture I highlight the rotary embeddings. How can get the ...
Christian01's user avatar
0 votes
0 answers
17 views

Errors in results after saving model vs using directly from memory

I am trying to save a Fine Tuned model using trainer.save_model() but after I load the saved_model it just responds with the input back again and does not give any ...
Nikhil Verma's user avatar
0 votes
0 answers
50 views

Specifying arguments of HuggingFaceHub

In this tutorial, when specifying llm = HuggingFaceHub( repo_id=repo_id, model_kwargs={"temperature": 0.5, "max_length": 64}) only ...
Karl 17302's user avatar
0 votes
1 answer
140 views

How to Use Multiple Adapters with a Pretrained Model in Hugging Face Transformers for Inference?

I have a pretrained Llama-2 model in the models_hf directory and two fine-tuned adapters: a summarization adapter in ...
Aun Zaidi's user avatar
1 vote
0 answers
47 views

Deploying a model with GPU and pay-per-inference

I may have the wrong stack exchange. If that's the case, could someone point me to a stack that could help with this. Anyways... My backend employs a sentence transformer model from HuggingFace. Since ...
AlwaysLearning's user avatar
0 votes
0 answers
17 views

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 ...
PS1's user avatar
  • 101
0 votes
0 answers
10 views

Create samples out of documents for Causal Language Modelling

I want to create an input source for Causal Language model using Llama 2 model in hugging face. I have a set of documents which are scraped from a specific website and want to fine-tune on them. Each ...
Dimits's user avatar
  • 11
0 votes
0 answers
290 views

Adapting a BERT-based model from HuggingFace for NER (named entity recognition) and RE (relation extraction)?

Context: NER (named entity recognition) and RE (relation extraction) from sentences obtained from radiology reports (medical text). There is a BERT-based model from HuggingFace I would like to use for ...
Pablo Messina's user avatar
0 votes
0 answers
17 views

Decoder model selection for sequence-to-sequence ASR with XLS-R

I am new to building models for Speech ASR. I want to build a model for Speech Transcription in Urdu. I used XLS-R (following the example by Patric von Platen on Huggingface Colab notebook. My ...
Aun Zaidi's user avatar
0 votes
0 answers
117 views

Fine-Tune Llama on main and auxiliary task

I am trying to fine-tune Llama model on two task at the same time, using hugging face library: Main task: Causal language model like the model was initially trained for A classification task based on ...
Dimits's user avatar
  • 11
0 votes
1 answer
667 views

Can I run falcon-7b on a free google colab?

I'm a beginner at ML and AI. Background: I wanted to try out falcon-7b, the example I'm trying out: https://colab.research.google.com/drive/1BiQiw31DT7-cDp1-0ySXvvhzqomTdI-o?usp=sharing (Falcon-...
hungryWolf's user avatar
0 votes
0 answers
17 views

Sentiment extraction with hugging face ready to use model

I have a set of reviews for which I need to extract their sentiments and use those sentiments as an independent variable in an econometric model. I used one of the ready-to-use models of hugging face ...
mansoor sh's user avatar
0 votes
0 answers
35 views

Which language model to use for this use case? [Finetuning on custom dataset]

An example from my train data is as follows: ...
ksgr5566's user avatar
  • 101
0 votes
0 answers
149 views

Multiple CSV files input for hugging face table question-answering in Python

I am trying to write a code in HuggingFace Python to input multiple CSV files and feed them to the tokenizer for table question-answering. If I were to input only one CSV file, the code would look ...
Ramin Salimi's user avatar
0 votes
0 answers
12 views

Large Language model for regression on urls

I am trying to fit a BERT model for a URL regression task. I have a URL as a feature and I have to predict a metric M for it. Keeping a learning rate like $10^{-5}$, the model is overfitting in about ...
guesta's user avatar
  • 1
0 votes
0 answers
122 views

How to load Hugginface model on CPU?

My system runs out of memory on GPU. But I want just to test if it works and want to load it on CPU. How do I do that? Adding device = torch.device(‘cpu’) before ...
Myron's user avatar
  • 113
0 votes
0 answers
17 views

"Probabilistic" One-Hot-Encoder for transformers library

I'm using the transformers library to fine-tune a LLM for classification. However, my problem is a bit particular, as the labels are hierarchical, that is, in the form A-1, A-2, B-1, B-2 etc. ...
EzrielS's user avatar
  • 323
1 vote
1 answer
103 views

How can someone evaluate llama index model?

I have built a openAI llama index based model which takes multiple pdf and able to give chatbot based response. I want to evaluate the llm for accuracy. I already know method such as Rouge and Bleu. ...
Prashant Pandya's user avatar
3 votes
1 answer
1k views

LMM Fine Tuning - Supervised Fine Tuning Trainer (SFTTrainer) vs transformers Trainer

When should one opt for the Supervised Fine Tuning Trainer (SFTTrainer) instead of the regular Transformers Trainer when it comes to instruction fine-tuning for Language Models (LLMs)? From what I ...
Marvin Martin's user avatar
0 votes
0 answers
54 views

What is exactly the difference between Huggingface, MLserver and seldon core?

Kind of a newbie to practical ML development. As far as I can understand, huggingface provides packaged, ready to deploy, pre trained ML models, whereas MLserver and seldon core are used to actually ...
thoraway121's user avatar
1 vote
0 answers
735 views

Fine-tuning a pre-trained LLM for question-answering

Objective My goal is to fine-tune a pre-trained LLM on a dataset about Manchester United's (MU's) 2021/22 season (they had a poor season). I want to be able to prompt the fine-tuned model with ...
Tom Bomer's user avatar
0 votes
0 answers
24 views

Extremely silly transformers fine-tuning doubt

Suppose say I have a TFT5ConditionalGenration model instantiated with tensor flow. When you do model.fit, the model will pass the inputs in a feed-forward way similar to a call method. The model will ...
NeverGiveUp's user avatar
1 vote
0 answers
166 views

How to monitor training of text generation models?

I'm finetuning a pretrained Huggingface model based on Transformers for a downstream Text Generation task, but I have doubts on how the fine-tuning process should be monitored: In classification, I ...
Ciodar's user avatar
  • 151
0 votes
1 answer
135 views

Can we train the Dolly v-2 model on a large general purpose unlabelled text?

I am familiar with ML and Deep Learning concepts and have had a look at Dolly and even got the pretrained model running on a Jupyter lab notebook on Databricks. However when I take a look at their ...
London guy's user avatar
0 votes
0 answers
22 views

Huggingface not saving model checkpoint

I am trying to train T5 model. This is how my training arguments look like: ...
RajS's user avatar
  • 103
0 votes
0 answers
684 views

Creating LLM chatbot using llama-index + langchain

As the title suggests: I'm trying to build a chatbot which his goal should be sort of like "chatgpt". The chatbot will be installed on Slack workspace and I'm struggling with which scope I ...
Ben's user avatar
  • 199
1 vote
0 answers
74 views

trainable weights in automodel and comparison with lora

if i use RobertaForSequenceClassification or AutoModelForSequenceClassification, are all the weights trained or only the new classification head trained also , i am also noticing for "roberta-...
prajwal rao's user avatar
0 votes
0 answers
71 views

Question about GPT-2 causal masking for downstream tuning

I'm currently finetuning a pre-trained GPT-2 model for image captioning. Using a ViT for image encoding, the output embeddings are then fed into the GPT-2 model (from HuggingFace) as ...
Jeff Tian's user avatar
0 votes
1 answer
219 views

Passing target text to gpt2 and T5 for fine tuning to learn text generation task

I have text with each line in following format: <text-1> some text-1 <text-2> some text-2 <text-3> some text-3 I want fine tune model to learn ...
RajS's user avatar
  • 103
1 vote
2 answers
763 views

Fine-tuned MLM based RoBERTa not improving performance

We have lots of domain-specific data (200M+ data points, each document having ~100 to ~500 words) and we wanted to have a domain-specific LM. We took some sample data points (2M+) & fine-tuned ...
Kalsi's user avatar
  • 11
0 votes
0 answers
192 views

Fine tune Flan T5 to build a SlackBot

I want to create a Slack chatbot that will be able to "somehow" mock a "ChatGPT like" behavior. I want the bot to be able: answer questions understand from context summarize info ...
Ben's user avatar
  • 199
2 votes
2 answers
1k views

Dynamic batching and padding batches for NLP in deep learning libraries

This is the usual way we train modern deep learning models for NLP, e.g. with Huggingface libraries where we have a fix length for the input no. of tokens/subwoords unit. https://huggingface.co/docs/...
alvas's user avatar
  • 2,340
0 votes
0 answers
833 views

RuntimeError: It looks like your LightningModule has parameters that were not used in producing the loss returned by training_step

I'm trying to use donut, which is a transformer model with a huggingface implementation, and pre-train it on a language it hasn't been yet on my desktop. Unfortunately the version of the stack ...
lte__'s user avatar
  • 1,310
0 votes
2 answers
67 views

Fine-tune GPT on sketch data (stroke-3)

These past days I have started a personal project where I would like to build a model that, given an uncompleted sketch, it can finish it. I was planning on using some pretrained models that are ...
ilved17's user avatar
  • 31
0 votes
0 answers
210 views

How to finetune a closed generative huggingface model?

I want to finetune a huggingface pretrained model on our internal documentation in a way it stats answering related questions. I could not find the adequate tutorial.
welu's user avatar
  • 131
0 votes
0 answers
52 views

Which decoder method is used with “facebook/wav2vec2-base-960h”?

When using wav2vec2: facebook/wav2vec2-base-960h Which decoder method is used when running processor.decode ? Naive Decoding or Beam Search or Language Model ? How can I see it on the ...
user3668129's user avatar
0 votes
0 answers
11 views

Which zero-shot models predict the contents of an image?

I'm looking for the class of machine learning models on Hugging Face where you provide an image and a list of options and it returns which of those options appear in the image for example I might ...
nickponline's user avatar
0 votes
0 answers
15 views

When using wav2vec2 inference, does the quantitation being used?

According to wav2vec model: it seems that quantitation only used on training phase (in order to train the transformer layer to quantitative the data to use small number of discrete values). So my ...
user3668129's user avatar
0 votes
0 answers
144 views

is the distilRoberta transformer model overfitting or underfitting?

I am a bit new to ML, below are the results after I fine tuned distilRoBERTa using HuggingFace Trainer. I cant tell if my model is over-fitting, under-fitting or ok? I ran 7 epochs. I think its ...
prak56's user avatar
  • 1
0 votes
0 answers
738 views

How to deal with DataCollator and DataLoaders in Huggingface?

I have issues combining a DataLoader and DataCollator. The following code with DataCollatorWithPadding results in a ...
3r1c's user avatar
  • 101
0 votes
1 answer
51 views

error useing soft max gives outputs greater than 1

I am using Hugging Face AutoModelForSequenceClassification, model is roberta, using it for text classification. There are 3 classes. The output is: ...
prajwal rao's user avatar
0 votes
3 answers
678 views

Combining sentence embeddings of two different models (sBERT and mBERT)

I am working on a chatbot that helps students. So, I wanted to make use of bert model which has better performance on mathematics, which lead to me to math-bert, but the paper on it said that it was ...
Glinty's user avatar
  • 23
0 votes
1 answer
127 views

Possible NLP approaches to extract 'goals' from text

I am planning to take up an interesting NLP project. I want to extract 'goal' statements from lengthy reports. For example, the goals can be We would be reducing our carbon footprint by 50% by 2025 or ...
air cooled's user avatar
0 votes
1 answer
173 views

Extract the embedding from a specific layer of MarianModel

I am using using MarianModel from the hub of HuggingFace for a translation task. Now I want to extract the embedding from the output of the last MarianEncoderLayer ...
lenhhoxung's user avatar
1 vote
1 answer
68 views

What could cause pre-trained Opus-MT models have wildly varying inference time when being used with transformers library?

I have been testing pre-trained Opus-MT models ported to transformers library for python implementation. Specifically, I am using opus-mt-en-fr for English to French translation. And the tokenizer and ...
Shan Dou's user avatar
  • 131