id
stringlengths
7
11
source
stringclasses
1 value
category
stringclasses
11 values
title
stringlengths
15
214
text
stringlengths
70
30.5k
url
stringlengths
57
160
tags
stringlengths
3
113
created_at
int64
1.22B
1.79B
se_78306632
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to deploy a Flask app in Vercel, so that I can use it as an API endpoint
How to deploy a Flask app in Vercel, so that I can use it as an API endpoint Error: The provided path “~/Desktop/deploy/app.py” is a file, but expected a directory. Please choose a different one. ? In which directory is your code located? ./ 🔗 Linked to my-projects/deploy (created .vercel) 🔍 Inspect: https://verce...
https://stackoverflow.com/questions/78306632/how-to-deploy-a-flask-app-in-vercel-so-that-i-can-use-it-as-an-api-endpoint
python, flask, deployment, vercel, large-language-model
1,712,776,262
se_78555060
stackoverflow
ARTIFICIAL_INTELLIGENCE
Azure OpenAI error Error code: 400 - {'statusCode': 400, 'message': "Unable to parse and estimate tokens from incoming request
Azure OpenAI error Error code: 400 - {'statusCode': 400, 'message': "Unable to parse and estimate tokens from incoming request I used this API a lot in the last few days, and today it's not working, and I don't know what's wrong: prompt = """some complex prompt (just text """ response = client.cha...
https://stackoverflow.com/questions/78555060/azure-openai-error-error-code-400-statuscode-400-message-unable-to-p
python, chatbot, openai-api, large-language-model, azure-openai
1,717,073,146
se_78570890
stackoverflow
ARTIFICIAL_INTELLIGENCE
Using Llama_index with Mistral Model
Using Llama_index with Mistral Model I'm new to the field of large language models (LLMs), so I apologize if my explanation isn't clear. I have a Mistral model running in a private cloud, and I have both the URL and the model name. URL = " http://mistral...../v1/chat/completions" Model = "Mistral-7B-Instruct-v0.2/" I ...
https://stackoverflow.com/questions/78570890/using-llama-index-with-mistral-model
large-language-model, llama-index, ollama, mistral-7b
1,717,424,621
se_77999424
stackoverflow
ARTIFICIAL_INTELLIGENCE
Trying to deploy ollama to google cloud run
Trying to deploy ollama to google cloud run I am trying to deploy ollama docker image with preinstalled models to google cloud run FROM ollama/ollama:latest RUN /bin/sh -c "/bin/ollama serve & sleep 1 && ollama pull phi" ENTRYPOINT ["/bin/ollama"] CMD ["serve"] it works fine in when i pull and run it in localhost ...
https://stackoverflow.com/questions/77999424/trying-to-deploy-ollama-to-google-cloud-run
docker, google-cloud-platform, google-cloud-run, large-language-model, ollama
1,707,987,219
se_78530745
stackoverflow
ARTIFICIAL_INTELLIGENCE
langchain RetrievalQA error: ValueError: Missing some input keys: {'query'}
langchain RetrievalQA error: ValueError: Missing some input keys: {'query'} In a RAG project, I am using langchain. When I run the QA chain with query input, this error keep showing up: ----> result = qa_chain({'query': question}) ValueError: Missing some input keys: {'query'} Here is my code: from langchain....
https://stackoverflow.com/questions/78530745/langchain-retrievalqa-error-valueerror-missing-some-input-keys-query
python, machine-learning, langchain, large-language-model, retrievalqa
1,716,585,829
se_78559525
stackoverflow
ARTIFICIAL_INTELLIGENCE
Retriever using LLM - capture context data
Retriever using LLM - capture context data This is the code shown below for getting response from RAG LLM. def response_llm(prompt, text1, text2, int1, int2): if len(text1)>1: prompt = prompt + "\n text1: " + text1 if len(text2) > 1: prompt = prompt + "\n text2: " + text2 docs = retriever.get_re...
https://stackoverflow.com/questions/78559525/retriever-using-llm-capture-context-data
large-language-model, retrieval-augmented-generation
1,717,150,771
se_78561532
stackoverflow
ARTIFICIAL_INTELLIGENCE
Open Source LLM Repeating Tokens Until Max Tokens Reached - How to Fix?
Open Source LLM Repeating Tokens Until Max Tokens Reached - How to Fix? I'm working with an open-source language model (LLM) for generating text in Portuguese, and I'm encountering an issue where the model keeps repeating tokens until the maximum number of tokens is reached. Here's a snippet of my code: # Import neces...
https://stackoverflow.com/questions/78561532/open-source-llm-repeating-tokens-until-max-tokens-reached-how-to-fix
python, huggingface-transformers, tokenize, large-language-model, mistral-7b
1,717,178,061
se_78514771
stackoverflow
ARTIFICIAL_INTELLIGENCE
Using the llama3 new template
Using the llama3 new template This is the current template that works for the other llms i am using. However I want to get this system working with a llama3. # Prompt template = """Based on the table schema below, write a SQLite query that would answer the user's question: {schema} Question: {question} SQL Query:"""...
https://stackoverflow.com/questions/78514771/using-the-llama3-new-template
prompt, langchain, large-language-model, llama, ollama
1,716,334,358
se_78564699
stackoverflow
ARTIFICIAL_INTELLIGENCE
Why is LlamaCPP freezing during inference?
Why is LlamaCPP freezing during inference? I'm using the following code to try and recieve a response from LlamaCPP, used through the LlamaIndex library. My model is stored locally in a gguf file. I'm trying to do inference on the CPU as my VRAM is limited. My program prints out the initialization code (also pasted be...
https://stackoverflow.com/questions/78564699/why-is-llamacpp-freezing-during-inference
python, artificial-intelligence, large-language-model, llama-index, llamacpp
1,717,268,888
se_78562336
stackoverflow
ARTIFICIAL_INTELLIGENCE
ScoredVector has no attribute 'metadata' at ['['received_data', 'matches', 0]']['metadata']
ScoredVector has no attribute 'metadata' at ['['received_data', 'matches', 0]']['metadata'] I'm building a chatbot RAG using HuggingFace, Mistral, LangChain and Pinecone. I have a Python Script to watch changes in my MongoDB collection and send the data to Pinecone as a vector. ...
https://stackoverflow.com/questions/78562336/scoredvector-has-no-attribute-metadata-at-received-data-matches-0
python, langchain, large-language-model, pinecone
1,717,194,702
se_77930819
stackoverflow
ARTIFICIAL_INTELLIGENCE
VertexAIException - list index out of range Error when calling Gemini-Pro API
VertexAIException - list index out of range Error when calling Gemini-Pro API I am calling Google Gemini-Pro API in a consecutive manner (like about 50 queries per minute). I believe I have properly set my VertexAI project and credentials. When the number of consecutive queries I used was below a constant bar, the que...
https://stackoverflow.com/questions/77930819/vertexaiexception-list-index-out-of-range-error-when-calling-gemini-pro-api
machine-learning, large-language-model, google-cloud-vertex-ai, quota, google-gemini
1,706,933,138
se_78384255
stackoverflow
ARTIFICIAL_INTELLIGENCE
What are the different python libraries to access Google LLMs?
What are the different python libraries to access Google LLMs? I have come across multiple different libraries for accessing Google LLMs. I am listing the ones I came across; but there may be more. The libraries that I have seen so far: # 1 from langchain_google_genai import ChatGoogleGenerativeAI, GoogleGenerativeAI ...
https://stackoverflow.com/questions/78384255/what-are-the-different-python-libraries-to-access-google-llms
langchain, large-language-model, google-cloud-vertex-ai
1,714,043,846
se_78410889
stackoverflow
ARTIFICIAL_INTELLIGENCE
i'm having bitsandbytes error while using unsloth in conda
i'm having bitsandbytes error while using unsloth in conda I'm trying to finetune llama3 model from Unsloth uding the code presented in one of there Colab notebooks, but I'm having several issues while running the code on my system. Following is the error I'm having. I'm using a conda Virtual Enviornment I'm follo...
https://stackoverflow.com/questions/78410889/im-having-bitsandbytes-error-while-using-unsloth-in-conda
python, nvidia, large-language-model, huggingface
1,714,508,978
se_78560825
stackoverflow
ARTIFICIAL_INTELLIGENCE
Contextual chunking of PDF's content ,having a problem to replicate logic to nest headings and subheadings while parsing PDFs
Contextual chunking of PDF's content ,having a problem to replicate logic to nest headings and subheadings while parsing PDFs def format(json_data): """ Extracts document title, headings, subheadings (if present), and content in a specific JSON format. Args: json_data: A dictionary containing ...
https://stackoverflow.com/questions/78560825/contextual-chunking-of-pdfs-content-having-a-problem-to-replicate-logic-to-nes
pdf, pdf-generation, google-docs-api, large-language-model, pdfplumber
1,717,168,040
se_78559983
stackoverflow
ARTIFICIAL_INTELLIGENCE
Using Inputparameter for Parameterizing the LLM part of my Chain
Using Inputparameter for Parameterizing the LLM part of my Chain I have a chain in Langchain and there are some input parameter: input_text:str -> for the template max_tokens:float -> for llm how can i distribute these variables/parameters to the right part of chain? I tried this: prompt: PromptTemplate = PromptT...
https://stackoverflow.com/questions/78559983/using-inputparameter-for-parameterizing-the-llm-part-of-my-chain
python, langchain, large-language-model, chain
1,717,157,724
se_78554118
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to deploy a finetuned model on a private server?
How to deploy a finetuned model on a private server? I have a project where I need to fine-tune a Large Language Model (LLM) such as LLAMA3 for a specific task and then deploy it on the company's server as a chatbot to recommend 'questionnaires / surveys' based on studies described by the users. As I am new to working...
https://stackoverflow.com/questions/78554118/how-to-deploy-a-finetuned-model-on-a-private-server
python, langchain, large-language-model, llamacpp
1,717,061,718
se_78417714
stackoverflow
ARTIFICIAL_INTELLIGENCE
ValidationError: 1 validation error for RetrievalQA retriever
ValidationError: 1 validation error for RetrievalQA retriever I am using pinecone vector database for storing the veactors of the text chunks, then I am imlementing similarity search to get similar document after that I am loading my llm model and using the retrieveralQA chain I am trying to use "from langchain.chains...
https://stackoverflow.com/questions/78417714/validationerror-1-validation-error-for-retrievalqa-retriever
python, langchain, large-language-model, transformer-model, ctransformers
1,714,637,103
se_78550266
stackoverflow
ARTIFICIAL_INTELLIGENCE
Pretrained Translation model(french to english) for food related data
Pretrained Translation model(french to english) for food related data I am working on a project that involves mapping between two food-related datasets. One dataset is in French, and the other is in English. Both datasets have a "food name" field, but I am not fluent in French and would prefer not to use Google Transl...
https://stackoverflow.com/questions/78550266/pretrained-translation-modelfrench-to-english-for-food-related-data
nlp, translation, bert-language-model, large-language-model, french
1,716,993,316
se_78383391
stackoverflow
ARTIFICIAL_INTELLIGENCE
Making an inference call to HuggingFace in Semantic Kernel causes 404 not found error
Making an inference call to HuggingFace in Semantic Kernel causes 404 not found error I can make serverless inference API calls to the models hosted in HuggingFace using request calls in Python. I want to achieve the same task using Semantic Kernel in C#. For this purpose, I import Microsoft.SemanticKernel.Connectors....
https://stackoverflow.com/questions/78383391/making-an-inference-call-to-huggingface-in-semantic-kernel-causes-404-not-found
large-language-model, huggingface, semantic-kernel
1,714,035,028
se_78544049
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to use a finetuned LLM with langchain?
How to use a finetuned LLM with langchain? I'm working on fine-tuning an LLM like LLAMA2 or LLAMA3 on a specific task which is recommendation of questionnaires depending on the purpose of the study and the data researchers want to collect. How do I use Langchain on a fine-tuned model? I guess I can always upload it to...
https://stackoverflow.com/questions/78544049/how-to-use-a-finetuned-llm-with-langchain
python, langchain, large-language-model
1,716,898,638
se_78545871
stackoverflow
ARTIFICIAL_INTELLIGENCE
Error list index out of range when trying to upsert on pinecone
Error list index out of range when trying to upsert on pinecone I'm creating a chatbot RAG using the content from my MongoDB and sending to create vectors on Pinecone. So my user can ask stuff to my chatbot about his reflections. Here is my code: import os from pymongo import MongoClient from pinecone import Pinecone,...
https://stackoverflow.com/questions/78545871/error-list-index-out-of-range-when-trying-to-upsert-on-pinecone
python, mongodb, large-language-model, upsert, pinecone
1,716,921,360
se_78546567
stackoverflow
ARTIFICIAL_INTELLIGENCE
LLM dataset tokenization issues for question answering fine tuning
LLM dataset tokenization issues for question answering fine tuning I am using hugging face to fine tune a LLM for question answering. I am trying to figure out how to write a data preprocessing/tokenization function to use for this data set. I am using the nvidia/ChatQA-Training-Data dataset that can be found on huggi...
https://stackoverflow.com/questions/78546567/llm-dataset-tokenization-issues-for-question-answering-fine-tuning
huggingface-transformers, tokenize, large-language-model, huggingface-tokenizers, roberta-language-model
1,716,933,241
se_78387056
stackoverflow
ARTIFICIAL_INTELLIGENCE
LangChain with Llama3 Stuck at Entering new AgentExecutor chain
LangChain with Llama3 Stuck at Entering new AgentExecutor chain I am trying to run a Pandas dataframe agent using ollama and llama3 but I am stuck at Entering new AgentExectur chain... . The ollama task is also continuously utilizing higher resources once the chain is entered. llm=Ollama(model="llama3") # Initializin...
https://stackoverflow.com/questions/78387056/langchain-with-llama3-stuck-at-entering-new-agentexecutor-chain
langchain, large-language-model, ollama
1,714,076,041
se_78542606
stackoverflow
ARTIFICIAL_INTELLIGENCE
LLM to convert binary to decimal
LLM to convert binary to decimal So, I'm a complete beginner on how to use any LLMs, given below is the code which I was using on my jupyter notebook to run a prompt to convert binary to decimal. However I was getting completely incorrect responses on Llama 3. !pip install -r requirements.txt import json import torch ...
https://stackoverflow.com/questions/78542606/llm-to-convert-binary-to-decimal
large-language-model
1,716,882,281
se_78463402
stackoverflow
ARTIFICIAL_INTELLIGENCE
Streaming LLM output in Django
Streaming LLM output in Django Im planning to develop Django framework for the LLM fine-tuned model based on HuggingFace models, I want the text to be streamed from model to the Django. My issue is that model streams the output in the terminal but not sure how to make it in a stream in a variable so that I can transfe...
https://stackoverflow.com/questions/78463402/streaming-llm-output-in-django
python, django, huggingface-transformers, large-language-model
1,715,402,538
se_78533186
stackoverflow
ARTIFICIAL_INTELLIGENCE
Streamlit not taking more than one prompts for cohere model in OCI Generative AI
Streamlit not taking more than one prompts for cohere model in OCI Generative AI I am trying to use Streamlit. The first prompt works, but when I pass the second or third prompt, it is throwing this error. It was working before but has started showing this error recently. I am not sure why there was a quota limit I sh...
https://stackoverflow.com/questions/78533186/streamlit-not-taking-more-than-one-prompts-for-cohere-model-in-oci-generative-ai
python, artificial-intelligence, streamlit, large-language-model, oracle-cloud-infrastructure
1,716,657,430
se_78533668
stackoverflow
ARTIFICIAL_INTELLIGENCE
TypeError: string indices must be integers when using FAISS for context in a chatbot
TypeError: string indices must be integers when using FAISS for context in a chatbot Question: I'm building a chatbot that incorporates a conversational retrieval system using Transformers and Gradio. The system retrieves context using FAISS for query context. However, I'm encountering an error that I can't seem to re...
https://stackoverflow.com/questions/78533668/typeerror-string-indices-must-be-integers-when-using-faiss-for-context-in-a-cha
python, chatbot, embedding, large-language-model, distilbert
1,716,669,702
se_78529027
stackoverflow
ARTIFICIAL_INTELLIGENCE
ValueError: expected sequence of length 32128 at dim 3 (got 512)
ValueError: expected sequence of length 32128 at dim 3 (got 512) I tried to train the following model but I keep receiving the mentioned issue: import pandas as pd import torch from transformers import T5ForConditionalGeneration, T5Tokenizer from torch.utils.data import Dataset, DataLoader from sklearn.model_selection...
https://stackoverflow.com/questions/78529027/valueerror-expected-sequence-of-length-32128-at-dim-3-got-512
python, pytorch, huggingface-transformers, torch, large-language-model
1,716,558,910
se_78523676
stackoverflow
ARTIFICIAL_INTELLIGENCE
AttributeError: 'OpenAI' object has no attribute 'fine_tunes'
AttributeError: 'OpenAI' object has no attribute 'fine_tunes' I work with Python in Jupyter Notebook 7.0.8 : Here is the error generated by the following cell: The error: --------------------------------------------------------------------------- AttributeError Traceback (mos...
https://stackoverflow.com/questions/78523676/attributeerror-openai-object-has-no-attribute-fine-tunes
jupyter-notebook, openai-api, large-language-model, gpt-3, fine-tuning
1,716,472,815
se_78525690
stackoverflow
ARTIFICIAL_INTELLIGENCE
TypeError: 'DataLoader' object is not subscriptable T5 model
TypeError: 'DataLoader' object is not subscriptable T5 model I'm trying to train my model using the following commands: import numpy as np import pandas as pd import os import pandas as pd import tensorflow as tf from transformers import AutoTokenizer, T5ForConditionalGeneration, T5Config # IMPORT REQUIRED D...
https://stackoverflow.com/questions/78525690/typeerror-dataloader-object-is-not-subscriptable-t5-model
python, tensorflow, huggingface-transformers, torch, large-language-model
1,716,500,597
se_78525221
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to efficiently chunk/embed json? (ollama, chromadb, gp4allembeddings/langchain)
How to efficiently chunk/embed json? (ollama, chromadb, gp4allembeddings/langchain) I've been working on a simple chatbot, it responds to inquiries in intercom and in telegram. It makes a database of information to pull from based on current support articles in Intercom. It worked pretty well with 150 articles, but as...
https://stackoverflow.com/questions/78525221/how-to-efficiently-chunk-embed-json-ollama-chromadb-gp4allembeddings-langcha
python, artificial-intelligence, large-language-model, llama, ollama
1,716,492,901
se_78523740
stackoverflow
ARTIFICIAL_INTELLIGENCE
Read Timeout When Using Llama3 Model on Streamlit
Read Timeout When Using Llama3 Model on Streamlit This is my first time asking a question on Stack Overflow. I am trying to run a Llama3 model that queries a PDF file on Streamlit. It uses llama index to chunk up the text and create a vector for each chunk. When you type a query, it creates a vector embedding for the ...
https://stackoverflow.com/questions/78523740/read-timeout-when-using-llama3-model-on-streamlit
timeout, streamlit, large-language-model
1,716,473,660
se_78345967
stackoverflow
ARTIFICIAL_INTELLIGENCE
Llama.cpp GPU Offloading Issue - Unexpected Switch to CPU
Llama.cpp GPU Offloading Issue - Unexpected Switch to CPU I'm reaching out to the community for some assistance with an issue I'm encountering in llama.cpp. Previously, the program was successfully utilizing the GPU for execution. However, recently, it seems to have switched to CPU execution. Observations: BLAS=1 is s...
https://stackoverflow.com/questions/78345967/llama-cpp-gpu-offloading-issue-unexpected-switch-to-cpu
large-language-model, llama, llama-cpp-python, llamacpp
1,713,428,817
se_78112934
stackoverflow
ARTIFICIAL_INTELLIGENCE
Getting "ValidationError: 1 validation error for VectorstoreIndexCreator embedding"
Getting "ValidationError: 1 validation error for VectorstoreIndexCreator embedding" I am trying to build a pdf chat bot where you upload a pdf and ask questions related to you pdf. For this, I was thinking of a RAG based application . So i wanted to create vector embeddings of my input pdf but when i do this...
https://stackoverflow.com/questions/78112934/getting-validationerror-1-validation-error-for-vectorstoreindexcreator-embeddi
python, machine-learning, large-language-model, openaiembeddings
1,709,714,853
se_78494810
stackoverflow
ARTIFICIAL_INTELLIGENCE
LLM generation problem - only returning gibberish?
LLM generation problem - only returning gibberish? I am trying to load a model from path into llamaindex with the HuggingfaceLLM class like this: from llama_index.llms.huggingface import HuggingFaceLLM llm = HuggingFaceLLM( context_window=2048, max_new_tokens=300, generate_kwargs={"temperature": 0.5, "do_sam...
https://stackoverflow.com/questions/78494810/llm-generation-problem-only-returning-gibberish
python, large-language-model, huggingface, llama-index
1,715,938,919
se_78519582
stackoverflow
ARTIFICIAL_INTELLIGENCE
VSCode Python Debugger Cannot Execute Third-Party Unit Test Package
VSCode Python Debugger Cannot Execute Third-Party Unit Test Package I am trying to use the VSCode debugger to run DeepEval for executing LLM-based unit tests. However, I keep encountering an error related to executing the deepeval package. Here is the error message I receive: $ /usr/bin/env C:\\Users\\myuser\\anacond...
https://stackoverflow.com/questions/78519582/vscode-python-debugger-cannot-execute-third-party-unit-test-package
python, visual-studio-code, debugging, large-language-model
1,716,405,268
se_78452739
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to convert a AutoModelForCausalLM object to a dspy model object?
How to convert a AutoModelForCausalLM object to a dspy model object? import dspy llm = dspy.HFModel(model='model') This method takes a string as input for the model if i have a quantized model object of the class AutoModelForCausalLM How i can convert the model object to dspy object? direct assignment gives error o...
https://stackoverflow.com/questions/78452739/how-to-convert-a-automodelforcausallm-object-to-a-dspy-model-object
nlp, large-language-model, llama, autoclass, dspy
1,715,237,122
se_78382978
stackoverflow
ARTIFICIAL_INTELLIGENCE
Issue while trying to install llama
Issue while trying to install llama The following is the error that I encountered while I am trying to install llama: vs[chatbot]pip install llama Collecting llama Using cached llama-0.1.1.tar.gz (387 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_inf...
https://stackoverflow.com/questions/78382978/issue-while-trying-to-install-llama
python, large-language-model, llama
1,714,030,369
se_76736361
stackoverflow
ARTIFICIAL_INTELLIGENCE
Llama QLora error: Target modules ['query_key_value', 'dense', 'dense_h_to_4h', 'dense_4h_to_h'] not found in the base model
Llama QLora error: Target modules ['query_key_value', 'dense', 'dense_h_to_4h', 'dense_4h_to_h'] not found in the base model I tried to load Llama-2-7b-hf LLM with QLora with the following code: model_id = "meta-llama/Llama-2-7b-hf" tokenizer = AutoTokenizer.from_pretrained(model_id, us...
https://stackoverflow.com/questions/76736361/llama-qlora-error-target-modules-query-key-value-dense-dense-h-to-4h
python, quantization, large-language-model, peft
1,689,928,315
se_78300896
stackoverflow
ARTIFICIAL_INTELLIGENCE
Can I use waitress with 1 thread, and order the requests by a priority?
Can I use waitress with 1 thread, and order the requests by a priority? I am currently using waittress with 1 thread because I am doing an AI inference API, however i would like to implement a priority queue to order the incomming requests. Is there any way to make waitress resolve requests in a defined order, or is t...
https://stackoverflow.com/questions/78300896/can-i-use-waitress-with-1-thread-and-order-the-requests-by-a-priority
flask, artificial-intelligence, large-language-model, waitress
1,712,693,562
se_78492223
stackoverflow
ARTIFICIAL_INTELLIGENCE
Langchain language parser does not work with java
Langchain language parser does not work with java I'm trying to read a git repo and parse the files from that repo. For that I'm reading files with the following code from langchain_community.document_loaders.parsers import LanguageParser from langchain_community.document_loaders.generic import GenericLoader def get_...
https://stackoverflow.com/questions/78492223/langchain-language-parser-does-not-work-with-java
langchain, large-language-model
1,715,889,551
se_78422935
stackoverflow
ARTIFICIAL_INTELLIGENCE
While using groq for my project im getting this error
While using groq for my project im getting this error def claim_agent(user_question): memory = ConversationBufferWindowMemory(ai_prefix="Insurance Agent", k=20) prompt_template = PromptTemplate( input_variables=['history', 'input'], template=""" You are a Insurance agent bot, you ha...
https://stackoverflow.com/questions/78422935/while-using-groq-for-my-project-im-getting-this-error
runtime-error, langchain, large-language-model, llama, groq
1,714,716,373
se_78152636
stackoverflow
ARTIFICIAL_INTELLIGENCE
Validation Error : Unable to instantiate GPT4AllEmbeddings Model
Validation Error : Unable to instantiate GPT4AllEmbeddings Model I am encountering an issue while trying to create an instance of GPT4AllEmbeddings. However i keep receiving the following error Cell In[15], line 1 ----> 1 vectorstore = Chroma.from_documents(documents = splits, embeddings = GPT4AllEmbeddings()) 2...
https://stackoverflow.com/questions/78152636/validation-error-unable-to-instantiate-gpt4allembeddings-model
python, machine-learning, large-language-model, gpt4all
1,710,322,567
se_77698411
stackoverflow
ARTIFICIAL_INTELLIGENCE
Is LlamaIndex.ts as rich as LlamaIndex for python?
Is LlamaIndex.ts as rich as LlamaIndex for python? I am building an application which involves uploading some PDF and storing it in Qdrant vector database. Later we can run queries against the PDF and the query response will be powered by a custom LLM. I have to use either GTE embeddings or MiniLM embeddings. The prob...
https://stackoverflow.com/questions/77698411/is-llamaindex-ts-as-rich-as-llamaindex-for-python
node.js, langchain, large-language-model, llama-index, retrieval-augmented-generation
1,703,166,738
se_77396803
stackoverflow
ARTIFICIAL_INTELLIGENCE
langchain.schema.output_parser.OutputParserException: Got invalid JSON object. Error: Extra data: line 7 column 1 (char 1406)
langchain.schema.output_parser.OutputParserException: Got invalid JSON object. Error: Extra data: line 7 column 1 (char 1406) I am getting intermittent json parsing error for output of string of chain.run() for the code snippet below Outline of the python function that queries LLM:- output_parser = StructuredOutp...
https://stackoverflow.com/questions/77396803/langchain-schema-output-parser-outputparserexception-got-invalid-json-object-e
parsing, langchain, large-language-model
1,698,762,780
se_77528234
stackoverflow
ARTIFICIAL_INTELLIGENCE
RetrievalQAWithSourcesChain
RetrievalQAWithSourcesChain My code: chain = RetrievalQAWithSourcesChain.from_llm(llm=llm, retriever=vectorIndex.as_retriever()) chain query = "what is the price of Tiago iCNG?" langchain.debug=True input_data = {"question": query} result = chain(input_data, return_only_outputs=True) I get this error: [chain/error]...
https://stackoverflow.com/questions/77528234/retrievalqawithsourceschain
python, langchain, large-language-model, faiss
1,700,640,353
se_78487476
stackoverflow
ARTIFICIAL_INTELLIGENCE
How does Langchain AgentExecutor serving model LLM?
How does Langchain AgentExecutor serving model LLM? I followed this tutorial I conducted some changes: I built model gemma:2b from Ollama built Ollama by docker I used this model replace with ChatOpenAI Summary steps/index_generator.py 2. steps/agent_creator.py After ran successfully pipeline, it created a...
https://stackoverflow.com/questions/78487476/how-does-langchain-agentexecutor-serving-model-llm
python, langchain, large-language-model, langchain-agents
1,715,830,654
se_78504131
stackoverflow
ARTIFICIAL_INTELLIGENCE
Why the padding side matters when giving the model attention mask?
Why the padding side matters when giving the model attention mask? I am very confused of why the padding side matters in a decoder only Model. If we give the Model the attention mask, no matter if it's left or right padding, the masked matmul scaled dot product of the padding tokens would be negative big numbers. Does...
https://stackoverflow.com/questions/78504131/why-the-padding-side-matters-when-giving-the-model-attention-mask
huggingface-transformers, large-language-model, decoder, llama
1,716,159,457
se_78276786
stackoverflow
ARTIFICIAL_INTELLIGENCE
Gemini Python API Deadline Exceeded
Gemini Python API Deadline Exceeded I have been trying to use Google's Gemini API using python, and I am running into continuous 504 Deadline Exceeded. This is also not a one of thing as well, I have tried 20+ times using python SDK and it failed everytime, while curl returned in 5-6 seconds everytime. I initially th...
https://stackoverflow.com/questions/78276786/gemini-python-api-deadline-exceeded
python, large-language-model, google-ai-platform, google-gemini, google-cloud-ai
1,712,267,364
se_78477036
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to get SQL query from NLP using Openai?
How to get SQL query from NLP using Openai? I am working on a POC for NLP to SQL query using the Langchain framework and OpenAI. Sometimes, the generated query has errors and giving wrong query. How can I improve the query generation process? Should I consider fine-tuning or any other method? Please provide some sugge...
https://stackoverflow.com/questions/78477036/how-to-get-sql-query-from-nlp-using-openai
openai-api, langchain, large-language-model, azure-openai
1,715,678,418
se_78384199
stackoverflow
ARTIFICIAL_INTELLIGENCE
Google Gemini Pro not providing response if tools are given
Google Gemini Pro not providing response if tools are given Google Gemini Pro works well if not tools are provided For example: import google.generativeai as genai def multiply(a:float, b:float): """returns a * b.""" return a*b model = genai.GenerativeModel(model_name='gemini-1.0-pro') chat = model.start_c...
https://stackoverflow.com/questions/78384199/google-gemini-pro-not-providing-response-if-tools-are-given
python, python-3.x, large-language-model, google-gemini
1,714,043,274
se_78497875
stackoverflow
ARTIFICIAL_INTELLIGENCE
Enforcing tokens per minute rate limit in FastAPI
Enforcing tokens per minute rate limit in FastAPI I'm developing FastAPI endpoints that rely on calls to OpenAI's chat completion. Some of the calls use asyncio.gather to make concurrent requests to OpenAI. Because of this, I'm worried about rate limits. I'm currently using Semaphore to limit the requests per minute, ...
https://stackoverflow.com/questions/78497875/enforcing-tokens-per-minute-rate-limit-in-fastapi
python-asyncio, fastapi, openai-api, large-language-model
1,715,978,567
se_77518719
stackoverflow
ARTIFICIAL_INTELLIGENCE
ImportError: libcudart.so.12: cannot open shared object file: No such file or directory
ImportError: libcudart.so.12: cannot open shared object file: No such file or directory I am very new to LLM serving and quantization. Any leads would be much appreciated. I am trying to quantize my model using Autoawq. I have installed the following packages: Package Version ------------------ ------------...
https://stackoverflow.com/questions/77518719/importerror-libcudart-so-12-cannot-open-shared-object-file-no-such-file-or-di
python, pytorch, gpu, large-language-model
1,700,512,320
se_78494341
stackoverflow
ARTIFICIAL_INTELLIGENCE
ChromaDB error when deployed in an OpenShift Container
ChromaDB error when deployed in an OpenShift Container I have deployed **chromadb **in a openshift container. It was showing error with sqlite3. So I resolved it by Changing the __init__.py file. I added these lines __import__('pysqlite3') import pysqlite3 sys.modules['sqlite3'] = sys.modules["pysqlite3"] But now I a...
https://stackoverflow.com/questions/78494341/chromadb-error-when-deployed-in-an-openshift-container
python, python-3.x, large-language-model, chromadb, retrieval-augmented-generation
1,715,933,702
se_78490985
stackoverflow
ARTIFICIAL_INTELLIGENCE
Langchain Open AI model error for llama index for Agentic RAG
Langchain Open AI model error for llama index for Agentic RAG I need your help on fixing the error of this matter. I am building agentic RAG via Langchain and Lamma Index, but I have an following error: ## When I use llm = LangChainLLM(llm=lc_llm_35)## -----------------------------------------------------------------...
https://stackoverflow.com/questions/78490985/langchain-open-ai-model-error-for-llama-index-for-agentic-rag
python, langchain, large-language-model, llama, llama-index
1,715,873,150
se_78018102
stackoverflow
ARTIFICIAL_INTELLIGENCE
Error with Annoy module in virtual environment when using NemoGuardrails in a Streamlit app
Error with Annoy module in virtual environment when using NemoGuardrails in a Streamlit app I've encountered an issue with the Annoy module within my virtual environment while developing a Streamlit app that incorporates LangChain, OpenAI, and NemoGuardrails. Despite installing the Annoy module within the virtual envi...
https://stackoverflow.com/questions/78018102/error-with-annoy-module-in-virtual-environment-when-using-nemoguardrails-in-a-st
nvidia, large-language-model, annoy, python-annoy
1,708,309,827
se_78245692
stackoverflow
ARTIFICIAL_INTELLIGENCE
Customize prompt llamaindex
Customize prompt llamaindex i have built chatbot using llamaindex to get response from a pdf, i want to add customize prompt also ,in which if the user messages is about booking appointment, then respond with "booknow!". Here's my basic implementation upload_dir = 'uploads/machinebuilt' file_paths = [os.path.join...
https://stackoverflow.com/questions/78245692/customize-prompt-llamaindex
chatbot, large-language-model, llama-index
1,711,742,184
se_78218999
stackoverflow
ARTIFICIAL_INTELLIGENCE
LangChain Agents: Conversational React Description
LangChain Agents: Conversational React Description Previously I used initialize_agent method by passing agent=AgentType.CONVERSATIONAL_REACT_DESCRIPTION to initialize a conversation react agent in LangChain v0.0. agent_executor = initialize_agent(tools=tools, llm=llm, ...
https://stackoverflow.com/questions/78218999/langchain-agents-conversational-react-description
python, openai-api, langchain, large-language-model
1,711,368,927
se_78483124
stackoverflow
ARTIFICIAL_INTELLIGENCE
Cannot use llm_chat_callback on an instance without a callback_manager attribute
Cannot use llm_chat_callback on an instance without a callback_manager attribute model_key = {"OpenAI": ["gpt-3.5-turbo","gpt-4"]} def get_embeddingmodel(self, model_name,api_key): if model_name in model_key["OpenAI"]: return OpenAIEmbedding(api_key=api_key) This is my method to return the Embeddings Model ...
https://stackoverflow.com/questions/78483124/cannot-use-llm-chat-callback-on-an-instance-without-a-callback-manager-attribute
python, artificial-intelligence, large-language-model, llama-index, openaiembeddings
1,715,767,251
se_78482279
stackoverflow
ARTIFICIAL_INTELLIGENCE
past key values from hidden states
past key values from hidden states I'm trying to extract past key, value pair using attention_layers and hidden_state for a particular layer import torch import torch.nn.functional as F from transformers import LlamaConfig from transformers import LlamaModel, LlamaTokenizer, LlamaForCausalLM tokenizer = LlamaTokenize...
https://stackoverflow.com/questions/78482279/past-key-values-from-hidden-states
python, nlp, huggingface-transformers, large-language-model
1,715,757,962
se_78478872
stackoverflow
ARTIFICIAL_INTELLIGENCE
Microsoft.ML.OnnxRuntimeGenAI parallelism performance
Microsoft.ML.OnnxRuntimeGenAI parallelism performance at first I want to say that I am newbie in ML at all and in .NET ML specifically. I have local phi-3 model in ONNX and .NET 8 API application // Program.cs var builder = WebApplication.CreateBuilder(args); var modelDirectory = @"path-to-local-model-directory";...
https://stackoverflow.com/questions/78478872/microsoft-ml-onnxruntimegenai-parallelism-performance
c#, .net, large-language-model, onnx, onnxruntime
1,715,697,859
se_78358685
stackoverflow
ARTIFICIAL_INTELLIGENCE
Slow query performance on llamaindex
Slow query performance on llamaindex I have a issue related to llamindex query for which I am unable to find resolution. Basically, I am trying to build a classifier using llamindex. I have around 700 docs (not huge - each is just a couple of paragraphs). I divide it into train test and build the index based on train....
https://stackoverflow.com/questions/78358685/slow-query-performance-on-llamaindex
large-language-model, azure-openai, llama-index
1,713,625,401
se_78456623
stackoverflow
ARTIFICIAL_INTELLIGENCE
half() is not supported for quantized model when using FineTuned
half() is not supported for quantized model when using FineTuned I have fine tuned a Llama-3 model ( model_name="meta-llama/Meta-Llama-3-8B") in standard way per this notebook https://colab.research.google.com/drive/1Zmaceu65d7w4Tcd-cfnZRb6k_Tcv2b8g?usp=sharing Using the merged model, I'm trying to deploy on AWS sagam...
https://stackoverflow.com/questions/78456623/half-is-not-supported-for-quantized-model-when-using-finetuned
huggingface-transformers, amazon-sagemaker, large-language-model, llama, peft
1,715,282,903
se_78436688
stackoverflow
ARTIFICIAL_INTELLIGENCE
Langchain Agents and tools: how to pass extra argument to tools other than input
Langchain Agents and tools: how to pass extra argument to tools other than input My LLM app contains a session for each user and userid. Here I want to pass userId (id of user who is currently using LLM app) to getPrice tools. How to send userId to tools? from langchain import hub from langchain.agents import AgentExe...
https://stackoverflow.com/questions/78436688/langchain-agents-and-tools-how-to-pass-extra-argument-to-tools-other-than-input
openai-api, langchain, large-language-model, langchain-agents
1,714,999,275
se_77195966
stackoverflow
ARTIFICIAL_INTELLIGENCE
Incorrect output for sentence_transformers CrossEncoder
Incorrect output for sentence_transformers CrossEncoder I am looking at the following example from the huggingface website (https://www.sbert.net/examples/applications/cross-encoder/README.html) from sentence_transformers.cross_encoder import CrossEncoder model = CrossEncoder(‘bert_base_uncased') scores = model.pred...
https://stackoverflow.com/questions/77195966/incorrect-output-for-sentence-transformers-crossencoder
huggingface-transformers, huggingface, large-language-model
1,695,911,761
se_78463290
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to make LLMs answer in certain pattern
How to make LLMs answer in certain pattern How can I design the LLM program so that the LLM will answer in some preset pattern?For example, if I want to use the LLM to promote some products or collect some information from the user, what adjustment should I try on the LLM program? Thx~ I tried modifying the prompts bu...
https://stackoverflow.com/questions/78463290/how-to-make-llms-answer-in-certain-pattern
nlp, artificial-intelligence, openai-api, large-language-model
1,715,398,081
se_78453483
stackoverflow
ARTIFICIAL_INTELLIGENCE
Text-2-Sql using Llama3 locally
Text-2-Sql using Llama3 locally I'm attempting to utilize the template provided in the Langchain repository for text-to-SQL retrieval using Llama3. Here's the link to the template: Langchain SQL LlamaCPP Template. Here is my code # chain.py code # Import necessary modules import os import re from langchain.memory imp...
https://stackoverflow.com/questions/78453483/text-2-sql-using-llama3-locally
python, postgresql, langchain, large-language-model
1,715,246,877
se_78453294
stackoverflow
ARTIFICIAL_INTELLIGENCE
why gradient scaling used in mix-precision training could lead to bigger Learning Rate in float32 model?
why gradient scaling used in mix-precision training could lead to bigger Learning Rate in float32 model? Background: Gradient Scaling original is used in mix-precision training like (part of model weights are float16 and part of them are float 32), which its purpose is to reduce underflow of small gradients stored wit...
https://stackoverflow.com/questions/78453294/why-gradient-scaling-used-in-mix-precision-training-could-lead-to-bigger-learnin
machine-learning, nlp, artificial-intelligence, large-language-model
1,715,244,582
se_78440609
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to reduce inference time and restrict additional information generation in Meta-Llama-3-8b model?
How to reduce inference time and restrict additional information generation in Meta-Llama-3-8b model? I have deployed the Meta-Llama-3-8b model on my server using Xinference. Everything is working good, however the inference time is about 16 seconds even for simple prompts, also it generates extra and additional infor...
https://stackoverflow.com/questions/78440609/how-to-reduce-inference-time-and-restrict-additional-information-generation-in-m
large-language-model, llama, inference-engine, text-generation
1,715,064,769
se_78445234
stackoverflow
ARTIFICIAL_INTELLIGENCE
Why am i getting a 424 HTTP error when calling Llama-3 endpoint in Azure AI Studio?
Why am i getting a 424 HTTP error when calling Llama-3 endpoint in Azure AI Studio? I deployed a llama-3-70b-instruct model via the Azure AI Studio. I then tried to call it with a HTTP request which resulted in a 424 HTTP error. This error still occured when using the example code provided by Microsfts "View Code" fea...
https://stackoverflow.com/questions/78445234/why-am-i-getting-a-424-http-error-when-calling-llama-3-endpoint-in-azure-ai-stud
azure, http, large-language-model, llama, azure-ai
1,715,118,436
se_77607854
stackoverflow
ARTIFICIAL_INTELLIGENCE
Langchain - ConversationalRetrievalChain with memory and customized prompt
Langchain - ConversationalRetrievalChain with memory and customized prompt I'm trying to create a ConversationalRetrievalChain to answer based on a specific context provided by a pdf file. I can get good answers. The issue is that the memory is not working. The code: template2 = """ Your name is Bot. You are a...
https://stackoverflow.com/questions/77607854/langchain-conversationalretrievalchain-with-memory-and-customized-prompt
python, artificial-intelligence, chatbot, langchain, large-language-model
1,701,794,401
se_78449510
stackoverflow
ARTIFICIAL_INTELLIGENCE
Docker containers not able to communicate with each other on the same machine
Docker containers not able to communicate with each other on the same machine I have a docker compose file running 2 different services and i have launched a third container which is acting as a database for the first two containers. Third container is a vector db and when i am trying to communicate via the new instan...
https://stackoverflow.com/questions/78449510/docker-containers-not-able-to-communicate-with-each-other-on-the-same-machine
python, docker, docker-compose, dockerfile, large-language-model
1,715,180,934
se_78449463
stackoverflow
ARTIFICIAL_INTELLIGENCE
Does a vector database maintain pre-vector chunked data for RAG systems?
Does a vector database maintain pre-vector chunked data for RAG systems? I believe that when using an LLM with a Retrieval-Augmented Generation (RAG) approach, the results retrieved from a vector search must ultimately be presented in text form. Otherwise, the prompt would just contain a series of numbers (vectors), w...
https://stackoverflow.com/questions/78449463/does-a-vector-database-maintain-pre-vector-chunked-data-for-rag-systems
large-language-model, vector-database, retrieval-augmented-generation
1,715,180,411
se_78449323
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to Determine Subject-Object Placement in SPARQL Triples?
How to Determine Subject-Object Placement in SPARQL Triples? I'm currently working on a project involving LLMs and SPARQL queries, particularly focusing on prompting LLMs to translate natural language questions into SPARQL queries. However, the model encounters challenges with determining the correct placement of enti...
https://stackoverflow.com/questions/78449323/how-to-determine-subject-object-placement-in-sparql-triples
sparql, rdf, large-language-model, wikidata, knowledge-graph
1,715,179,036
se_78444988
stackoverflow
ARTIFICIAL_INTELLIGENCE
Observation: Python REPL is not a valid tool, try one of [python_repl_ast]. in Langchain
Observation: Python REPL is not a valid tool, try one of [python_repl_ast]. in Langchain from langchain.agents import initialize_agent from langchain.llms.fake import FakeListLLM from langchain.agents import AgentType from langchain_experimental.tools import PythonAstREPLTool res = ["Action: Python REPL\nAction Input:...
https://stackoverflow.com/questions/78444988/observation-python-repl-is-not-a-valid-tool-try-one-of-python-repl-ast-in-l
python, artificial-intelligence, langchain, large-language-model
1,715,114,832
se_78417850
stackoverflow
ARTIFICIAL_INTELLIGENCE
Conversational Product search using LLM
Conversational Product search using LLM What we want is when the user asks for something, searches for the product in our database with millions of data, shows results then asks the user to give more details and then shows more relevant products etc. The chat continuation is just one part of it Is there any way GPT ca...
https://stackoverflow.com/questions/78417850/conversational-product-search-using-llm
database, search, large-language-model, chatgpt-api, vector-search
1,714,638,904
se_78391157
stackoverflow
ARTIFICIAL_INTELLIGENCE
Ray error when trying to deploy Llama3 70b with VLLM with Vertex AI
Ray error when trying to deploy Llama3 70b with VLLM with Vertex AI Using Vertex ai custom container online predictions, i'm trying to deploy: meta-llama/Meta-Llama-3-70B-Instruct with vllm 0.4.1 on 8 NVIDIA_L4 gpus and gettings: /tmp/ray is over 95% full, available space: 5031063552; capacity: 101203873792. Object...
https://stackoverflow.com/questions/78391157/ray-error-when-trying-to-deploy-llama3-70b-with-vllm-with-vertex-ai
large-language-model, ray, google-ai-platform, vllm
1,714,141,746
se_78438186
stackoverflow
ARTIFICIAL_INTELLIGENCE
RAG returning prompt + context + answer as output whereas i just need the answer
RAG returning prompt + context + answer as output whereas i just need the answer I'm trying to build a conversational RAG with chat history kept in memory. The output gives everything including the context, prompt template, question and answer. I just want the answer. Code conversational_rag_chain = RunnableWithMes...
https://stackoverflow.com/questions/78438186/rag-returning-prompt-context-answer-as-output-whereas-i-just-need-the-answer
langchain, large-language-model, retrieval-augmented-generation
1,715,015,981
se_77751416
stackoverflow
ARTIFICIAL_INTELLIGENCE
Error in transformers.Trainer when I want to train fine-tuned model
Error in transformers.Trainer when I want to train fine-tuned model I created stablelm-3b-4e1t model and I use TweetSumm dataset for training it. But I have a problem to fine-tune this model and train it. I got an error on transformers.Trainer. I used PEFT library to fine-tune model. Can anyone tell where the problem ...
https://stackoverflow.com/questions/77751416/error-in-transformers-trainer-when-i-want-to-train-fine-tuned-model
python, pytorch, large-language-model
1,704,279,699
se_78352032
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to change distance function in `langchain` similarity_search
How to change distance function in `langchain` similarity_search I have two questions: How could I change the distance metric directly in the function similarity_search. Because by default the function similarity_search uses euclidean distance and I want e.g. cosine. Ho could I do that? from eurelis_langchain_solr_v...
https://stackoverflow.com/questions/78352032/how-to-change-distance-function-in-langchain-similarity-search
solr, langchain, large-language-model
1,713,511,787
se_78434891
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to prompt gpt so it does not make mistakes with time window
How to prompt gpt so it does not make mistakes with time window I'm trying to extract property condition from estate description. In particular, any property being renovated in 2020 or above should be tagged as "JUST_RENOVATED" whereas if the renovation took place before 2020, it should simply be tagged as "GOOD". Her...
https://stackoverflow.com/questions/78434891/how-to-prompt-gpt-so-it-does-not-make-mistakes-with-time-window
python, openai-api, large-language-model
1,714,977,352
se_78434615
stackoverflow
ARTIFICIAL_INTELLIGENCE
Accessing of vaiable from inside of the flask instance to outside
Accessing of vaiable from inside of the flask instance to outside from pydantic import BaseModel, Field from langchain.agents import initialize_agent, Tool, AgentType from langchain.tools import BaseTool, class GetIncidentsByUserInput(BaseModel): """Input for Get Incidents by User.""" assigned_to: str = Field(....
https://stackoverflow.com/questions/78434615/accessing-of-vaiable-from-inside-of-the-flask-instance-to-outside
python, pydantic, large-language-model
1,714,971,607
se_76048714
stackoverflow
ARTIFICIAL_INTELLIGENCE
Finetuning a LM vs prompt-engineering an LLM
Finetuning a LM vs prompt-engineering an LLM Is it possible to finetune a much smaller language model like Roberta on say, a customer service dataset and get results as good as one might get with prompting GPT-4 with parts of the dataset? Can a fine-tuned Roberta model learn to follow instructions in a conversational ...
https://stackoverflow.com/questions/76048714/finetuning-a-lm-vs-prompt-engineering-an-llm
language-model, roberta-language-model, roberta, gpt-4, large-language-model
1,681,848,918
se_78367787
stackoverflow
ARTIFICIAL_INTELLIGENCE
Llama3 via Ollama - Where can I find the default model system message?
Llama3 via Ollama - Where can I find the default model system message? I want to understand what the default parameters are. If I do not pass a system message what is the default one? etc..
https://stackoverflow.com/questions/78367787/llama3-via-ollama-where-can-i-find-the-default-model-system-message
large-language-model, llama, ollama
1,713,804,806
se_78371518
stackoverflow
ARTIFICIAL_INTELLIGENCE
TPM limit reached when using OpenAI API and Langchain MapReduceDocumentsChain
TPM limit reached when using OpenAI API and Langchain MapReduceDocumentsChain I'm trying to use Langchain's MapReduceDocumentsChain in combination with OpenAI's API to summarize a the content of a big document through the following chain (which was copied from Langchain's documentation): def _create_document_summary_c...
https://stackoverflow.com/questions/78371518/tpm-limit-reached-when-using-openai-api-and-langchain-mapreducedocumentschain
python, openai-api, langchain, large-language-model
1,713,867,056
se_78430569
stackoverflow
ARTIFICIAL_INTELLIGENCE
ConnectionRefusedError When try to do embedding in RAG
ConnectionRefusedError When try to do embedding in RAG I wanted to write Rag and using llama3 on Google Colab and I used the following code: #### INDEXING #### # Load Documents loader = WebBaseLoader( web_paths=("https://lilianweng.github.io/posts/2023-06-23-agent/",), bs_kwargs=dict( parse_only=bs4.S...
https://stackoverflow.com/questions/78430569/connectionrefusederror-when-try-to-do-embedding-in-rag
langchain, large-language-model, httpconnection
1,714,862,725
se_78426646
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to run LLM from transformers library under Windows without GPU?
How to run LLM from transformers library under Windows without GPU? I have no GPU but I can run openbuddy-llama3-8b-v21.1-8k from ollama. It works with speed of ~1 t/s. But it doesn't work when I try the following code: from transformers import ( AutoModelForCausalLM, AutoTokenizer, GenerationConfig, ) imp...
https://stackoverflow.com/questions/78426646/how-to-run-llm-from-transformers-library-under-windows-without-gpu
python, huggingface-transformers, large-language-model
1,714,764,904
se_78427134
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to feed a RAG / vector database with mysql data (incl. relations)
How to feed a RAG / vector database with mysql data (incl. relations) I've been searching high and low and I'm close enough to give up. I'm playing around with LLMs and vector databases / RAGs (looking at Milvus ATM. I found plenty of articles on how to integrate RAGs with Mysql, however they always include only one t...
https://stackoverflow.com/questions/78427134/how-to-feed-a-rag-vector-database-with-mysql-data-incl-relations
mysql, large-language-model, vector-database
1,714,773,795
se_77531993
stackoverflow
ARTIFICIAL_INTELLIGENCE
run LLM on single gpu with 8GB ram
run LLM on single gpu with 8GB ram I have a single nvidia gpu with 8 GB of ram. I’m running it on an ubuntu server 18.04 LTS. I’m able to pass queries and get response from flan-T5, but when I tried performing peft with lora I got a “gpu out of memory” error. Similarly I tried running camel-5b and llama2-7b-chat as ch...
https://stackoverflow.com/questions/77531993/run-llm-on-single-gpu-with-8gb-ram
langchain, huggingface, large-language-model
1,700,673,608
se_77006406
stackoverflow
ARTIFICIAL_INTELLIGENCE
Flan-T5 params clarification
Flan-T5 params clarification this is a general guidance question. I want a clear explanation of 2 parameters of Flan-T5 : max_length num_return_sequences Also what is the input limit for flan-t5 ?
https://stackoverflow.com/questions/77006406/flan-t5-params-clarification
nlp, large-language-model
1,693,385,575
se_78426720
stackoverflow
ARTIFICIAL_INTELLIGENCE
When I try to perform testing in my knowledge base, the model does not load in amazon bedrock
When I try to perform testing in my knowledge base, the model does not load in amazon bedrock When I try to perform testing using my knowledge base for RAG in amazon bedrock, when I have to select the model, it keeps loading forever I tried activating the claude model by antrophic, because I know that is the only mode...
https://stackoverflow.com/questions/78426720/when-i-try-to-perform-testing-in-my-knowledge-base-the-model-does-not-load-in-a
amazon-web-services, nlp, large-language-model, amazon-bedrock
1,714,766,252
se_78420830
stackoverflow
ARTIFICIAL_INTELLIGENCE
Unsloth not detecting CUDA and "str2optimizer32bit"
Unsloth not detecting CUDA and "str2optimizer32bit" I'm facing issues with Unsloth not detecting CUDA and encountering a "str2optimizer32bit" error. My setup includes an HP Z4 workstation with an Intel Core i7 processor and an NVIDIA 1080Ti GPU, running Ubuntu 22.04. CUDA version is 12.1, and PyTorch version...
https://stackoverflow.com/questions/78420830/unsloth-not-detecting-cuda-and-str2optimizer32bit
python, machine-learning, artificial-intelligence, large-language-model, custom-training
1,714,671,058
se_78413409
stackoverflow
ARTIFICIAL_INTELLIGENCE
I'm trying to fine tune a model for a question-answer task, but I keep encountering errors. Why?
I'm trying to fine tune a model for a question-answer task, but I keep encountering errors. Why? I'm trying to fine-tune a model for my thesis using the following dataset for question-and-answer tasks: https://huggingface.co/datasets/SzegedAI/MILQA/tree/main, in the following code: ` import os import json import t...
https://stackoverflow.com/questions/78413409/im-trying-to-fine-tune-a-model-for-a-question-answer-task-but-i-keep-encounter
python, compiler-errors, large-language-model, fine-tuning
1,714,561,780
se_78310494
stackoverflow
ARTIFICIAL_INTELLIGENCE
Running mistral:instruct through ollama in colab is very slow
Running mistral:instruct through ollama in colab is very slow I want to use colab's GPU when running ollama. To be able to run it I use ngrok to set the tunnel. All works fine and I can pull model and use it. However, even though I use mistral/instruct which should be quite small (4 gb), the scoring is very slow. Plea...
https://stackoverflow.com/questions/78310494/running-mistralinstruct-through-ollama-in-colab-is-very-slow
json, pydantic, large-language-model, mistral-7b, ollama
1,712,840,294
se_78409544
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to tune agent _executor for better understanding of the database
How to tune agent _executor for better understanding of the database I have a database in which I have connected an agent too. However, I have noticed that it sometimes gets confused between whether or not it should return a column ID or persons first name when asked "which person sold the most....?" Is there a way to...
https://stackoverflow.com/questions/78409544/how-to-tune-agent-executor-for-better-understanding-of-the-database
python, artificial-intelligence, langchain, large-language-model
1,714,490,449
se_78417490
stackoverflow
ARTIFICIAL_INTELLIGENCE
Optimal Learning Rate and Batch Size for LLM Training
Optimal Learning Rate and Batch Size for LLM Training What are the best practices for optimizing batch size and learning rate in training Large Language Models (LLMs)? How should these hyperparameters be adjusted relative to each other for efficient convergence and improved performance? Additionally, could you provide...
https://stackoverflow.com/questions/78417490/optimal-learning-rate-and-batch-size-for-llm-training
nlp, large-language-model, batchsize, learning-rate
1,714,634,327
se_77077603
stackoverflow
ARTIFICIAL_INTELLIGENCE
run llama-2-70B-chat model on single gpu
run llama-2-70B-chat model on single gpu I'm running pytorch on an ubuntu server 18.04 LTS. I have an nvidia gpu with 8 GB or ram. I'd like to experiment with the new llma2-70B-chat model. I'm trying to use peft and bitsandbytes to reduce the hardware requirements as described in the link below: https://www.youtube...
https://stackoverflow.com/questions/77077603/run-llama-2-70b-chat-model-on-single-gpu
python, pytorch, gpu, large-language-model, llama
1,694,374,026
se_78213588
stackoverflow
ARTIFICIAL_INTELLIGENCE
usage of vllm for extracting embeddings
usage of vllm for extracting embeddings Following is a little piece of code to extract embeddings from a certain layer of LLM: def process_row(prompt: str, model, tokenizer, layers_to_use: list, remove_period: bool): """ Processes a row of data and returns the embeddings. """ if remove_period: ...
https://stackoverflow.com/questions/78213588/usage-of-vllm-for-extracting-embeddings
python, nlp, huggingface-transformers, large-language-model
1,711,261,806
se_78414783
stackoverflow
ARTIFICIAL_INTELLIGENCE
AI based text game autocompletes user inputs prematurely
AI based text game autocompletes user inputs prematurely I am trying to write a text-based adventure game following a YouTube tutorial here. After updating the code according to the latest documentation, I've encountered a problem where the AI responds to the inputs that should be for the player. This issue persists f...
https://stackoverflow.com/questions/78414783/ai-based-text-game-autocompletes-user-inputs-prematurely
python, openai-api, langchain, large-language-model, datastax-astra
1,714,579,881
se_78402555
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to upload your fine-tuned model on HuggingFace and use it as an API? Or Should i use GCP?
How to upload your fine-tuned model on HuggingFace and use it as an API? Or Should i use GCP? Goal: I am trying to upload my finetuned model on huggingface, and then I want to use it as an API for my Android and IOS application, but I am not sure about the process. I also have tried to look around on GCP, it seems the...
https://stackoverflow.com/questions/78402555/how-to-upload-your-fine-tuned-model-on-huggingface-and-use-it-as-an-api-or-shou
google-cloud-platform, large-language-model, huggingface
1,714,391,880