Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [large-language-model]

A general tag for large language model (LLM)-related subjects. Please ALWAYS use the more specific tags if available (GPT variants, PaLM , LLaMa, BLOOM, Claude etc..)

large-language-model
14 votes
4 answers
20k views

Sentence embeddings from LLAMA 2 Huggingface opensource

Is there any way of getting sentence embeddings from meta-llama/Llama-2-13b-chat-hf from huggingface? Model link: https://huggingface.co/meta-llama/Llama-2-13b-chat-hf I tried using transfomer....
Mukesh Reddy's user avatar
5 votes
1 answer
7k views

How to add new tokens to an existing Huggingface tokenizer?

How to add new tokens to an existing Huggingface AutoTokenizer? Canonically, there's this tutorial from Huggingface https://huggingface.co/learn/nlp-course/chapter6/2 but it ends on the note of "...
alvas's user avatar
  • 120k
9 votes
5 answers
10k views

ValueError: Invalid pattern: '**' can only be an entire path component

I am trying to fine tune a LLM My code so far: from datasets import load_dataset, DatasetDict, Dataset from transformers import ( AutoTokenizer, AutoConfig, ...
Hitesh Somani's user avatar
4 votes
1 answer
10k views

I don't understand how the prompts work in llama_index

I have been trying to query a pdf file in my local directory using LLM, I have downloaded the LLM model I'm using in my local system (GPT4All-13B-snoozy.ggmlv3.q4_0.bin) and trying to use langchain ...
Avish Wagde's user avatar
2 votes
1 answer
3k views

WARNING - Can't find a Python library, got libdir=None, ldlibrary=None, multiarch=None, masd=None

Trying to install llama-cpp-python with "pip install llama-cpp-python". It is failing with following error. pip install llama-cpp-python Collecting llama-cpp-python Using cached ...
vardhan's user avatar
  • 47
1 vote
1 answer
4k views

Trying to install guanaco (pip install guanaco) for a text classification model but getting error

I'm trying to install the guanaco language model https://arxiv.org/abs/2305.14314 using pip install guanaco for a text classification model but getting error. Failed to build guanaco ERROR: Could not ...
Tamanna -'s user avatar
16 votes
2 answers
17k views

Why does llama-index still require an OpenAI key when using Hugging Face local embedding model?

I am creating a very simple question and answer app based on documents using llama-index. Previously, I had it working with OpenAI. Now I want to try using no external APIs so I'm trying the Hugging ...
Mikey A. Leonetti's user avatar
11 votes
2 answers
8k views

Streaming ChatGPT's results with Flask and LangChain

Basically I want to achieve this with Flask and LangChain: https://www.youtube.com/watch?v=x8uwwLNxqis. I'm building a Q&A Flask app that uses LangChain in the backend, but I'm having trouble to ...
Dante Noguez's user avatar
10 votes
1 answer
4k views

How do I slim down SBERT's sentencer-transformer library?

SBERT's (https://www.sbert.net/) sentence-transformer library (https://pypi.org/project/sentence-transformers/) is the most popular library for producing vector embeddings of text chunks in the Python ...
nmurthy's user avatar
  • 1,507
8 votes
1 answer
8k views

How to compute sentence level perplexity from hugging face language models?

I have a large collection of documents each consisting of ~ 10 sentences. For each document, I wish to find the sentence that maximises perplexity, or equivalently the loss from a fine-tuned causal LM....
pilu's user avatar
  • 790
6 votes
1 answer
4k views

How does `enforce_stop_tokens` work in LangChain with Huggingface models?

When we look at HuggingFaceHub model usage in langchain there's this part that the author doesn't know how to stop the generation, https://github.com/hwchase17/langchain/blob/master/langchain/llms/...
alvas's user avatar
  • 120k
4 votes
3 answers
13k views

In Langchain, why ConversationalRetrievalChain not remembering the chat history and Entering new ConversationalRetrievalChain chain for each chat?

I am trying to create an customer support system using langchain. I am using text documents as external knowledge provider via TextLoader In order to remember the chat I using ...
RagAnt's user avatar
  • 1,076
3 votes
1 answer
5k views

ERROR: The prompt size exceeds the context window size and cannot be processed

I have been trying to create a document QA chatbot using GPT4ALL as the llm and hugging face's instructor-large model for embedding, I was able to create the index, but getting the following as a ...
Avish Wagde's user avatar
2 votes
0 answers
1k views

Training huggingface's GPT2 from scratch : how to implement causal mask?

I am trying to train huggingface's implementation of the GPT2 model from scratch (meaning I am using their architecture but not using pre-trained weights) but I noticed by looking into the code here ...
Johncowk's user avatar
  • 359
2 votes
0 answers
2k views

langchain: Getting File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__ pydantic.error_wrappers.ValidationError: 1

I am using langchain with Open ai GPT-3.5. I am using agents to send user's queries to specific tools and I am getting output responses through my agent. Now I want the output response to be JSON but ...
user18148705's user avatar

15 30 50 per page