92 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
0
answers
69
views
How to pass P_map: dict[str, torch.Tensor] to PEFT (LoRA)?
My proxy goal is to change LoRA from h = (W +BA)x to h = (W + BAP)x. Preliminary code attached for your reference
My actual goal is to train a model with the following loss: 〖Θ ̃=(arg min)┬Δ ̂ 〗〖‖f_(...
1
vote
0
answers
62
views
Why does hugging face trainer still recognize different device between my encoder & classifier head even after I manually map it on the same device
I encounterd this error while trying to run hugging face trainer on a multi-gpu.
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cuda:0 and cuda:1!
I use a ...
1
vote
0
answers
56
views
BLIP Fine-Tuning: Special Token Always Biased to One Class in Generated Caption
I'm trying to fine-tune Hugging Face BLIP (Bootstrapped Language-Image Pretraining) to classify pizza boxes as either recyclable (clean) or non-recyclable (contaminated) by generating captions that ...
0
votes
0
answers
85
views
Why is LeRobot’s policy ignoring additional camera streams despite custom `input_features`?
I'm using LeRobot to train a SO101 arm policy with 3 video streams (front, above, gripper) and a state vector. The dataset can be found at this link.
I created a custom JSON config (the train_config....
0
votes
0
answers
86
views
Trainer is failing to load optimizer save state when resuming training
Intro to the problem
I am trying to train Llama-3.1 8B on an H100 but I keep running into the following error when trying to resume training
...
File "/home/jovyan/folder/training/.venv/lib/...
0
votes
0
answers
32
views
How to access logits from the forward pass in a Trainer Callback?
How to access the logits generated by the forward pass in a Trainer Callback ?
I'm trying to look at the length of my model's prediction at every step and log it in a csv file.
I've defined a custom ...
-2
votes
1
answer
59
views
Fine-tuning a model with the Trainer API | TypeError: object of type 'NoneType' has no len()
I am using hugging face Trainer API.
transformers version==4.31.0
torch==2.0.1
accelerate==0.27.0
I'm trying to fine-tune a TimeSformer model for video classification using the Hugging Face ...
0
votes
0
answers
131
views
TrainingArguments: Do "packing" and "group_by_length" counteract each other?
In the HuggingFace's TrainingArguments and SFTConfig (inheriting from TrainingArguments), there are two arguments for initializing SFTConfig():
group_by_length: Whether or not to group together ...
2
votes
2
answers
4k
views
TypeError in SFTTrainer: Unexpected Keyword Arguments (packing, dataset_text_field, max_seq_length)
I'm trying to fine-tune a model using SFTTrainer from trl, but I'm facing multiple TypeError issues related to unexpected keyword arguments.
from transformers import TrainingArguments
from trl import ...
0
votes
0
answers
123
views
IterableDataset not supported on GRPOTrainer
The following program crashes upon execution
from datasets import IterableDataset, Dataset
from trl import GRPOConfig, GRPOTrainer
prompts = ["Hi", "Hello"]
def data_generator():
...
0
votes
1
answer
807
views
How to fix Index put requires the source and destination dtypes match` with `google/gemma-2-2b` in Transformers?
I’m trying to train a language model using google/gemma-2-2b with the Hugging Face Transformers Trainer. The same training script works fine for other models like gpt2 and meta-llama/Meta-Llama-3-8B, ...
0
votes
0
answers
155
views
Cannot compute eval_loss when finetuning with LoRA
I am attempting to fine-tune a HuggingFace model using Low Rank Adaptation (LoRA). I want to evaluate the model for each epoch while implementing 5-fold cross validation. With the LoRA feature, the ...
2
votes
1
answer
116
views
how to get custom column in the model's forward() function when training with Huggingface Trainer?
I am using Huggingface Trainer to train a cumstom model subclassing a Llama llm. After tokenized by the tokenizer, my dataset has these fields 'input_ids', 'labels' and so on, and I additionally add 2 ...
1
vote
0
answers
42
views
tokenizer.train_from_iterator throwing TypeError: expected string or buffer
I'm trying to build a custom Tokenizer for a project, and I'm getting error for tokenizer.train_from_iterator:
class IngenxPreTokenizer:
def pre_tokenize(self, pretok: PreTokenizedString):
...
0
votes
1
answer
718
views
Huggingface trainer is not showing any progress for finetuning
I have a dataset I want to fine-tune a huggingface LLM with.
This dataset is quite simple. It has two columns: one column has DNA sequences (each in the form of a string 5000 letters long). Another ...