Questions tagged [huggingface]

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.

606 questions
2
votes
0 answers

SentencePiece tokenizer encodes to unknown token

I am using HuggigFace implementation of SentencePiece tokenizer, i.e., SentencePieceBPETokenizer and SentencePieceUnigramTokenizer classes. I train these tokenizers on dataset which has no unicode characters and then try to encode the string that…
2
votes
0 answers

call huggingface tokenizer in c#

I would like to call huggingface tokenizer in C# and wonder what might be the best way to achieve this. Specifically, I'd like to use mt5 tokenizer for CJK languages in C#. I have seen certain nuget packages developed such as BertTokenizer in C#,…
exteral
  • 991
  • 2
  • 12
  • 33
2
votes
1 answer

Finetuning Open LLMs

I am a newbie trying to learn fine tuning. Started with falcon 7B instruct LLM as my base LLM and want to fine tune this with open assistant instruct dataset. I have 2080 Ti with 11G VRAM. So I am using 4 bit quantization and Lora. These are the…
codemugal
  • 81
  • 1
  • 1
  • 4
2
votes
2 answers

AttributeError: 'AcceleratorState' object has no attribute 'distributed_type'

import transformers from datasets import load_dataset import tensorflow as tf tokenizer = transformers.AutoTokenizer.from_pretrained('roberta-base') df = load_dataset('csv', data_files={'train':'FinalDatasetTrain.csv',…
Amr Samer
  • 21
  • 1
2
votes
0 answers

How to finetune an LLM model on your own codebase?

I have 10 code repositories in Javascript (VueJS) (Each repository corresponds to 1 Theme) I want to train an LLM model on these 10 code repositories so that I can generate new themes using prompts. The LLM model take the context of 10 code…
Aadesh
  • 403
  • 3
  • 13
2
votes
1 answer

Look for good ways to prepare customized dataset for training controlnet with huggingface diffusers

I want to personally train the controlnet, but I find it inconvenient to prepare the datasets. As I follow the huggingface tutorial available at this link: https://huggingface.co/blog/train-your-controlnet, I believe I should organize the dataset in…
Yun
  • 21
  • 2
2
votes
1 answer

How to use HuggingFace Inference endpoints for both tokenization and inference?

I am trying to set up separate endpoints for tokenization and inference using HuggingFace models. Ideally I would like to use HuggingFace inference endpoints. Is there a straightforward way to spin up endpoints for encoding, decoding, and inference…
2
votes
1 answer

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 questions such as "How can MU improve?", or "What are…
2
votes
1 answer

Stable Diffusion Webui ConnectTimeoutError while starting

I'm trying to set up stable diffusion on a server so that users can access it via RDP and generate what they need. The server in place I hosted on-premise and doesn't have any internet connection. I installed all needed libs via whl files. I was…
Sacul0815
  • 21
  • 2
2
votes
1 answer

Huggingface - Pipeline with a fine-tuned pre-trained model errors

I have a pre-trained model from facebook/bart-large-mnli I used the Trainer in order to train it on my own dataset. model = BartForSequenceClassification.from_pretrained("facebook/bart-large-mnli", num_labels=14, ignore_mismatched_sizes=True) And…
2
votes
0 answers

How to use huggingface + gradio API in javascript

I'm going over the fastai ML course and got stuck in the second lesson with a minor problem - a classifier app that works fine on huggingface spaces doesn't get called correctly by a script suggested by the course team. Here's the code: Having…
2
votes
1 answer

What is the function of the `text_target` parameter in Huggingface's `AutoTokenizer`?

I'm following the guide here: https://huggingface.co/docs/transformers/v4.28.1/tasks/summarization There is one line in the guide like this: labels = tokenizer(text_target=examples["summary"], max_length=128, truncation=True) I don't understand the…
Betty
  • 512
  • 7
  • 19
2
votes
1 answer

Export MarianMT model to ONNX

I would like to use the Helsinki-NLP/opus-mt-de-en model from HuggingFace to translate text. This works fine with the HuggingFace Inference API or a Transformers pipeline, e.g.: from transformers import AutoTokenizer, pipeline from…
RGe
  • 1,181
  • 1
  • 10
  • 19
2
votes
0 answers

Huggingface - time out or connection error

I want to use LLaMA and OPT via the Hugging Face API. However, I always get the same two error messages. Either ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')) Or {'error': 'Model…
Frigoooo
  • 51
  • 4
2
votes
1 answer

validation loss shows 'no log' during fine-tuning model

I'm finetuning QA models from hugging face pretrained models using huggingface Trainer, during the training process, the validation loss doesn't show. My compute_metrices function returns accuracy and f1 score, which doesn't show in the log as…