Skip to main content
Share Your Experience: Take the 2024 Developer Survey
2 votes
Accepted

Data generation methods for NLP tasks

There are dozens of public sentiment analysis datasets you can use. Check out Kaggle datasets and Paperswithcode for that. Another popular approach is to generate your own synthetic dataset with an ...
noe's user avatar
  • 26.9k
2 votes
Accepted

Information extraction with word count limit

It's plenty of summarization models on Hugging Face, as an example you can use Falcon LLM summarization where you can summarize giving constraints on the min and max length of the summarization. Here ...
Nauel's user avatar
  • 136
2 votes
Accepted

How do I get model.generate() to omit the input sequence from the generation?

Given that Llama is a decoder-only model, the output of the model (i.e. outputs) is just the whole sequence. You can, nevertheless, decode only the new tokens ...
noe's user avatar
  • 26.9k
2 votes

How to choose a loss function and how to calculate the loss for Text Generation in Generative AI?

For classification, you use binary cross-entropy if it's binary classification or categorical-cross entropy if it's multiclass-classification. In both cases, you compute the loss against the true ...
noe's user avatar
  • 26.9k
1 vote

Improving GPU Utilization in LLM Inference System

The system you have designed is not capable of processing multiple requests concurrently. GPUs cannot process separate workloads in parallel (at least not without exerting control at the SM layer and ...
Karl's user avatar
  • 746
1 vote

What to do if I have a very low metric on one of the classes during multiclass classification?

You could try several things. First, you might want to bootstrap these metrics and get a feel for how your model does on different subsamples of your data to determine if this is actually a problem or ...
healthydata's user avatar
1 vote

Why do we use similarity/cosine between Query and Key in attention?

the purpose of this similarity is not to find the most similar words in terms of their meaning, but rather to identify which words in the input sequence are most relevant for generating each output ...
Amritesh Nandan's user avatar
1 vote

Why do we use similarity/cosine between Query and Key in attention?

Remember that the embedding representations change as the input goes through the model. For the very first input (after embedding tokens), you have an embedding sequence where each item represents a ...
Karl's user avatar
  • 746
1 vote
Accepted

How OpenAI embeddings work?

OpenAI described their embeddings in this article. In the last version, they also incorporate the matryoshka representation learning technique. The answers to your questions: The corpus used to train ...
noe's user avatar
  • 26.9k

Only top scored, non community-wiki answers of a minimum length are eligible