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_79061780
stackoverflow
ARTIFICIAL_INTELLIGENCE
LLM not able to parse output using stroutputparser()
LLM not able to parse output using stroutputparser() I am often getting this error in Langchain agent.I am doing a RAG operation and using Langchain tools and agents. I use AWS services like bedrock and Lambda for the application. This is How, I have defined agents: from langchain.agents.initialize import initialize_a...
https://stackoverflow.com/questions/79061780/llm-not-able-to-parse-output-using-stroutputparser
python, amazon-web-services, artificial-intelligence, large-language-model, py-langchain
1,728,301,144
se_79052117
stackoverflow
ARTIFICIAL_INTELLIGENCE
huggingface model inference: ERROR: Flag 'minloglevel' was defined more than once (in files 'src/error.cc' and ..)
huggingface model inference: ERROR: Flag 'minloglevel' was defined more than once (in files 'src/error.cc' and ..) I'm trying to use llama 3.1 70b from huggingface(end goal is to quantize it and deploy it in amazon sagemaker), but I'm facing: ERROR: Flag 'minloglevel' was defined more than once (in fi...
https://stackoverflow.com/questions/79052117/huggingface-model-inference-error-flag-minloglevel-was-defined-more-than-onc
python, artificial-intelligence, large-language-model, huggingface, llama
1,727,988,391
se_78540428
stackoverflow
ARTIFICIAL_INTELLIGENCE
Peft model from checkpoint leading into size missmatch
Peft model from checkpoint leading into size missmatch I have trained peft model and saved it in huggingface. No i want to merge it with base model. i have used following code. from peft import PeftModel, PeftConfig,AutoPeftModelForCausalLM from transformers import AutoModelForCausalLM,pipeline,AutoTokenizer,BitsAndBy...
https://stackoverflow.com/questions/78540428/peft-model-from-checkpoint-leading-into-size-missmatch
deep-learning, large-language-model, llama, fine-tuning, peft
1,716,831,304
se_79058765
stackoverflow
ARTIFICIAL_INTELLIGENCE
Agent stopped due to iteration limit or time limit
Agent stopped due to iteration limit or time limit Facing this error - Agent stopped due to iteration limit or time limit. my code - from langchain_experimental.agents import create_csv_agent from langchain_ollama import OllamaLLM from langchain.callbacks.manager import CallbackManager from langchain.callbacks.streami...
https://stackoverflow.com/questions/79058765/agent-stopped-due-to-iteration-limit-or-time-limit
langchain, large-language-model, ollama
1,728,208,269
se_79047727
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to implement SwiGLU activation? Why does SwiGLU takes in two tensors?
How to implement SwiGLU activation? Why does SwiGLU takes in two tensors? The SwiGLU variant introduced in https://arxiv.org/pdf/2002.05202 is simply "divine benevolence" and the implementation on Flash-Attention just works out of the box https://github.com/Dao-AILab/flash-attention/tree/main Comparing the the impleme...
https://stackoverflow.com/questions/79047727/how-to-implement-swiglu-activation-why-does-swiglu-takes-in-two-tensors
python, deep-learning, pytorch, large-language-model, flash-attn
1,727,887,149
se_79053320
stackoverflow
ARTIFICIAL_INTELLIGENCE
Add an image in prompt for AzureOpenAI gpt4-mini?
Add an image in prompt for AzureOpenAI gpt4-mini? I am able to use the web interface of azure OpenAI studio in the chat playground to analyze images but I would like to do the same using python. It seems that it's not working and I could not (so far) find a reference online on how to include an image in the prompt. Co...
https://stackoverflow.com/questions/79053320/add-an-image-in-prompt-for-azureopenai-gpt4-mini
python, large-language-model, azure-openai, gpt-4, gpt-4o-mini
1,728,028,787
se_78911596
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to make HuggingFace LLMs run faster
How to make HuggingFace LLMs run faster I am using a LLM as part of my project, the model I am using is Llama 3.1 8B with fp16, I tried to test the model's performance in colab notebook, here is the parameters and it was set to the most common settings for these models. model = "meta-llama/Meta-Llama-3.1-8B-Instruct" ...
https://stackoverflow.com/questions/78911596/how-to-make-huggingface-llms-run-faster
performance, large-language-model
1,724,600,900
se_79036452
stackoverflow
ARTIFICIAL_INTELLIGENCE
XFormersMetadata.__init__() got an unexpected keyword argument 'is_prompt'
XFormersMetadata.__init__() got an unexpected keyword argument 'is_prompt' I am building an application which uses llm inference, so I tried vllm. Since there is little to no information available for this library I wish to seek the help of experts. The code snippet that I have attached below is just for testi...
https://stackoverflow.com/questions/79036452/xformersmetadata-init-got-an-unexpected-keyword-argument-is-prompt
python, machine-learning, artificial-intelligence, large-language-model, vllm
1,727,615,000
se_76931414
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to Control Sequence Length in "load_summarize_chain" with "map_reduce" from langchain? - Exceeding Maximum Token Indices Error
How to Control Sequence Length in "load_summarize_chain" with "map_reduce" from langchain? - Exceeding Maximum Token Indices Error Could you please explain the way to control "sequence length" when we use map_reduce with load_summarize_chain from langchain? from langchain.chains.summarize import lo...
https://stackoverflow.com/questions/76931414/how-to-control-sequence-length-in-load-summarize-chain-with-map-reduce-from
langchain, large-language-model
1,692,379,293
se_78539092
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to provide additional information on enum values to an LLM in LangChain
How to provide additional information on enum values to an LLM in LangChain I'm trying to extract structured information with an LLM say GPT-4 using LangChain in python. My goal is to classify companies by associating them with tags. My output class is of the type: from langchain_core.pydantic_v1 import BaseModel cla...
https://stackoverflow.com/questions/78539092/how-to-provide-additional-information-on-enum-values-to-an-llm-in-langchain
python, enums, large-language-model, py-langchain
1,716,813,036
se_78763327
stackoverflow
ARTIFICIAL_INTELLIGENCE
Convert safetensors model format(LLaVA model) into gguf format
Convert safetensors model format(LLaVA model) into gguf format I want to do LLaVA inference in ollama, so I need to convert it in gguf file format. My model has the file format safetensors.(trained with lora) It seems that ollama supports only llama, but not llava as shown here, https://github.com/ollama/ollama/blob/m...
https://stackoverflow.com/questions/78763327/convert-safetensors-model-formatllava-model-into-gguf-format
machine-learning, artificial-intelligence, large-language-model
1,721,292,473
se_79037613
stackoverflow
ARTIFICIAL_INTELLIGENCE
Why is my RAG LLM not retrieving my custom data?
Why is my RAG LLM not retrieving my custom data? I am very new to RAG and LLM so forgive some of my technical skills. I'm trying to create a chatbot using LLMs that teaches DSA topics, and I learnt that using RAG technique you can supposedly feed new data into the LLM so it can give you the most updated answer. Basica...
https://stackoverflow.com/questions/79037613/why-is-my-rag-llm-not-retrieving-my-custom-data
python, large-language-model, rag
1,727,655,069
se_79032395
stackoverflow
ARTIFICIAL_INTELLIGENCE
ValueError(f"Missing some input keys: {missing_keys}")
ValueError(f"Missing some input keys: {missing_keys}") I am facing an error: ValueError(f"Missing some input keys: {missing_keys}") from this code. I am trying to parse resumes that are not supposed to have the keywords Name, phone, about_me in them. However, it parses the keyword it finds similar to the Py...
https://stackoverflow.com/questions/79032395/valueerrorfmissing-some-input-keys-missing-keys
python, fastapi, openai-api, large-language-model, resume
1,727,458,345
se_78856891
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to effective pre-process / prepare a large codebase for RAG using a local LLM?
How to effective pre-process / prepare a large codebase for RAG using a local LLM? I want to use RAG on our organisation's codebase using a local Open-source LLM? How can i prepare the files of codebase to work with RAG. I tried converting all the files of the codebase to txt files and fed into LLM, but I dont think i...
https://stackoverflow.com/questions/78856891/how-to-effective-pre-process-prepare-a-large-codebase-for-rag-using-a-local-ll
large-language-model, llama, github-copilot, ollama, rag
1,723,318,753
se_78355243
stackoverflow
ARTIFICIAL_INTELLIGENCE
Is merge in Byte Pair encoding (BPE) optimal?
Is merge in Byte Pair encoding (BPE) optimal? Let a string be s = "aeeefeekeelaeoae", Vocab: {a, e, f, k, l, o} (set of characters in s) Lets say I performed Byte Pair Encoding (BPE) on s and I want number of merges to be 2 such that my final vocab size becomes 8. "ee" gets merged first because it occurs the most. How...
https://stackoverflow.com/questions/78355243/is-merge-in-byte-pair-encoding-bpe-optimal
nlp, encode, tokenize, large-language-model, byte-pair-encoding
1,713,546,201
se_77596608
stackoverflow
ARTIFICIAL_INTELLIGENCE
How do I load huggingface model locally to use with langchain and host and streamlit?
How do I load huggingface model locally to use with langchain and host and streamlit? I am trying to make an AI app with langchain and Huggingface. I got the following error: { "error": "Could not load model paragon-AI/blip2-image-to-text with any of the following classes: (<class 'transformers.models.blip_2.modeling...
https://stackoverflow.com/questions/77596608/how-do-i-load-huggingface-model-locally-to-use-with-langchain-and-host-and-strea
python, huggingface-transformers, streamlit, langchain, large-language-model
1,701,647,832
se_79028921
stackoverflow
ARTIFICIAL_INTELLIGENCE
LangChain Agent Failing
LangChain Agent Failing I am often getting this error in langchain agent.I am doing a RAG operation and using langchain tools and agents. I use AWS services like bedrock and Lambda for the application. this is How, I have defined agents: agent = initialize_agent( tools=tools, llm=llm, agent="zero-s...
https://stackoverflow.com/questions/79028921/langchain-agent-failing
python, artificial-intelligence, large-language-model, py-langchain
1,727,380,234
se_79021544
stackoverflow
ARTIFICIAL_INTELLIGENCE
Removing strange/special characters from outputs llama 3.1 model
Removing strange/special characters from outputs llama 3.1 model Background: I'm using Hugging Face's transformers package and Llama 3.1 8B (Instruct). Problem: I am generating responses to a prompt one word at a time in the following way (note that I choose over texts and append that to the input_string, then repeat ...
https://stackoverflow.com/questions/79021544/removing-strange-special-characters-from-outputs-llama-3-1-model
python, huggingface-transformers, tokenize, large-language-model, llama
1,727,248,476
se_78906594
stackoverflow
ARTIFICIAL_INTELLIGENCE
Ollama Installation on Docker Container and Docker Compose file
Ollama Installation on Docker Container and Docker Compose file I have created a local chatbot code in python 3.10.10. I want to let it run on the Server. Therefore, I have created a docker container. Since in my source (chatbot code), i am using below dependencies chromadb==0.5.3 streamlit==1.36.0 langchain_core==0.2...
https://stackoverflow.com/questions/78906594/ollama-installation-on-docker-container-and-docker-compose-file
port, chatbot, langchain, large-language-model, ollama
1,724,426,870
se_79026315
stackoverflow
ARTIFICIAL_INTELLIGENCE
Using Langchain ChatOpenAI functionality with LiteLLM
Using Langchain ChatOpenAI functionality with LiteLLM I have initially written two functions to provide me with a model and function calling directly from OpenAI. Here is the complete code: from langchain_openai import ChatOpenAI def get_open_ai(temperature=0, model='gpt-4'): llm = ChatOpenAI( model=model, ...
https://stackoverflow.com/questions/79026315/using-langchain-chatopenai-functionality-with-litellm
python, machine-learning, openai-api, large-language-model, py-langchain
1,727,340,279
se_79026040
stackoverflow
ARTIFICIAL_INTELLIGENCE
Git clone hangs at `git-lfs: filepathfilter`
Git clone hangs at `git-lfs: filepathfilter` I'm git clone a model repo which contains large file to be downloaded by lfs. The command I used is: git lfs install env GIT_TRACE=1 GIT_CURL_VERBOSE=1 clone https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2 I found that the clone progress just hangs at trace git-l...
https://stackoverflow.com/questions/79026040/git-clone-hangs-at-git-lfs-filepathfilter
git, model, large-language-model
1,727,336,337
se_77671077
stackoverflow
ARTIFICIAL_INTELLIGENCE
RuntimeError: Library libcublas.so.11 is not found or cannot be loaded
RuntimeError: Library libcublas.so.11 is not found or cannot be loaded I am working on an LLM project on google colab using V100 GPU, High-RAM mode, and these are my dependencies: git+https://github.com/pyannote/pyannote-audio git+https://github.com/huggingface/transformers.git@v4.34.1 openai==0.28 ffmpeg-python panda...
https://stackoverflow.com/questions/77671077/runtimeerror-library-libcublas-so-11-is-not-found-or-cannot-be-loaded
python, pytorch, google-colaboratory, large-language-model, openai-whisper
1,702,733,478
se_78974474
stackoverflow
ARTIFICIAL_INTELLIGENCE
What features to extract to cluster text?
What features to extract to cluster text? I want to make a classifier for text, which is further use to suggest the most similar text for a one given. The flow of the app is the following: extract the main 10 topics from the text, using a llm (it can choose from a 150 words pool) I make the word vector a binary vecto...
https://stackoverflow.com/questions/78974474/what-features-to-extract-to-cluster-text
machine-learning, nlp, cluster-analysis, text-processing, large-language-model
1,726,066,609
se_78715749
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to fix this error: KeyError: &#39;model.embed_tokens.weight&#39;
How to fix this error: KeyError: &#39;model.embed_tokens.weight&#39; This is the detailed error: Traceback (most recent call last): File "/home/cyq/zxc/SmartEdit/train/DS_MLLMSD11_train.py", line 769, in <module> train() File "/home/cyq/zxc/SmartEdit/train/DS_MLLMSD11_train.py", line 540, in train model_.l...
https://stackoverflow.com/questions/78715749/how-to-fix-this-error-keyerror-model-embed-tokens-weight
large-language-model, transformer-model, pre-trained-model, llama, checkpoint
1,720,294,904
se_78158178
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to connect Llama-Index Pandas Query Engine with multiple dataframes?
How to connect Llama-Index Pandas Query Engine with multiple dataframes? As per the documentation of Pandas Query Engine, the code sets only allow for one df to be connected. I would like to connect to multiple dfs. This works on PandasAI through SmartDataLake, but i prefer the descriptive answers given by Pandas Quer...
https://stackoverflow.com/questions/78158178/how-to-connect-llama-index-pandas-query-engine-with-multiple-dataframes
python, pandas, large-language-model, llama-index
1,710,392,011
se_78159438
stackoverflow
ARTIFICIAL_INTELLIGENCE
Problem with inserting vectors into PineconeDB
Problem with inserting vectors into PineconeDB I am trying to insert the vectors into by pinecone database by this lines of code: console.log('inserting vectors into Pinecone'); const namespace = pineconeIndex.namespace(convertToAscii(filekey)); console.log("inserting vectors into pinecone"); await names...
https://stackoverflow.com/questions/78159438/problem-with-inserting-vectors-into-pineconedb
next.js, vector, large-language-model, pinecone
1,710,409,095
se_78698212
stackoverflow
ARTIFICIAL_INTELLIGENCE
LLamaIndex-ReACT agent talking to itself and hallucinating
LLamaIndex-ReACT agent talking to itself and hallucinating I'm new to creating a custom ReACT agent to query my data using the RAG technique. It turns out that my locally running LLama2 7B model(Using Ollama) does fine with questions about my data(I added the retriever as a Queryengine tool) but for casual conversatio...
https://stackoverflow.com/questions/78698212/llamaindex-react-agent-talking-to-itself-and-hallucinating
large-language-model, llama-index, ollama, pinecone
1,719,936,655
se_79012611
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to make a local llm call a tool in langchain?
How to make a local llm call a tool in langchain? I have the following code: from langchain_community.tools.tavily_search import TavilySearchResults from IPython.display import Image, display from PIL import Image from langchain import hub from langchain_core.prompts import ChatPromptTemplate from langchain.callbacks....
https://stackoverflow.com/questions/79012611/how-to-make-a-local-llm-call-a-tool-in-langchain
langchain, large-language-model, llama, langgraph
1,727,038,985
se_79011094
stackoverflow
ARTIFICIAL_INTELLIGENCE
invoke_agent - getting input and output tokens tokens for underlying invoke_model api calls in bedrock agent runtime
invoke_agent - getting input and output tokens tokens for underlying invoke_model api calls in bedrock agent runtime In the documentation for invoke_agent, the response has this sub key called inputTokens and outputTokens. The said keys are supposed to be part of the trace, hence trace needs to be enabled. I’m not see...
https://stackoverflow.com/questions/79011094/invoke-agent-getting-input-and-output-tokens-tokens-for-underlying-invoke-mode
amazon-web-services, large-language-model, amazon-bedrock
1,726,990,217
se_78028402
stackoverflow
ARTIFICIAL_INTELLIGENCE
ModuleNotFoundError for &#39;llama_index.vector_stores&#39; in Python Project
ModuleNotFoundError for &#39;llama_index.vector_stores&#39; in Python Project I'm working on a Python project involving embeddings and vector storage, and I'm trying to integrate llama_index for its vector storage capabilities with PostgreSQL. However, I'm encountering a ModuleNotFoundError when attempting to import P...
https://stackoverflow.com/questions/78028402/modulenotfounderror-for-llama-index-vector-stores-in-python-project
large-language-model, llama-index
1,708,441,782
se_77050866
stackoverflow
ARTIFICIAL_INTELLIGENCE
Why I am getting &quot;Notebook out of memory&quot; error upon notebook submission in Kaggle
Why I am getting &quot;Notebook out of memory&quot; error upon notebook submission in Kaggle I am participating in a Kaggle competition. Over the past 7-10 days I have been facing a peculiar problem. I am trying to make my submission to the competition, but am getting "Notebook out of memory" error again and again as ...
https://stackoverflow.com/questions/77050866/why-i-am-getting-notebook-out-of-memory-error-upon-notebook-submission-in-kagg
python, nlp, huggingface-transformers, kaggle, large-language-model
1,693,994,150
se_78999652
stackoverflow
ARTIFICIAL_INTELLIGENCE
Error during the compilation of the tokenizers package when trying to install transformers 4.27
Error during the compilation of the tokenizers package when trying to install transformers 4.27 The use of chatglm-6b requires the installation of transformers==4.27.1. I'm trying to install transformers==4.27.1, but I'm encountering an error during the compilation of the tokenizers package, which prevents the succes...
https://stackoverflow.com/questions/78999652/error-during-the-compilation-of-the-tokenizers-package-when-trying-to-install-tr
artificial-intelligence, huggingface-transformers, large-language-model
1,726,683,230
se_78996129
stackoverflow
ARTIFICIAL_INTELLIGENCE
TypeError: Object of type FieldInfo is not JSON serializable
TypeError: Object of type FieldInfo is not JSON serializable I am building a simple RAG usin ChatNvidia as my llm but I keep getting this error: TypeError: Object of type FieldInfo is not JSON serializable each time I try running this code: from langchain_core.runnables import RunnablePassthrough def format_docs(do...
https://stackoverflow.com/questions/78996129/typeerror-object-of-type-fieldinfo-is-not-json-serializable
python, langchain, large-language-model
1,726,615,825
se_77242784
stackoverflow
ARTIFICIAL_INTELLIGENCE
ElasticsearchDatabaseChain in langchain Index specification
ElasticsearchDatabaseChain in langchain Index specification from elasticsearch import Elasticsearch from langchain.chat_models import ChatOpenAI from langchain.chains.elasticsearch_database import ElasticsearchDatabaseChain ELASTIC_SEARCH_SERVER = "https://elastic:pass@localhost:9200" db = Elasticsearch(ELASTIC_SEARC...
https://stackoverflow.com/questions/77242784/elasticsearchdatabasechain-in-langchain-index-specification
elasticsearch, streamlit, openai-api, langchain, large-language-model
1,696,579,186
se_78990683
stackoverflow
ARTIFICIAL_INTELLIGENCE
How can run vLLM model on a multi GPU server
How can run vLLM model on a multi GPU server I want to run an LLM model on a multi-gpu server (4 GPU) using vLLM. Here is the command line I run: python3 -m vllm.entrypoints.api_server --model bjaidi/Phi-3-medium-128k-instruct-awq --quantization awq --dtype auto --gpu-memory-utilization 0.8 I got this error: [rank0]:...
https://stackoverflow.com/questions/78990683/how-can-run-vllm-model-on-a-multi-gpu-server
python, gpu, large-language-model, vllm
1,726,497,987
se_78362370
stackoverflow
ARTIFICIAL_INTELLIGENCE
Problem determining cuda/GPU as device for generator of LLM, always going back to CPU
Problem determining cuda/GPU as device for generator of LLM, always going back to CPU Background: I am trying to finetune Microsoft's Phi-2 model which is a 2.5 billion parameter LLM published on HuggingFace with instruction tuning with a little over 2000 quotes. I want to create a recognizable output change due to th...
https://stackoverflow.com/questions/78362370/problem-determining-cuda-gpu-as-device-for-generator-of-llm-always-going-back-t
gpu, cpu, huggingface-transformers, large-language-model
1,713,717,605
se_78977938
stackoverflow
ARTIFICIAL_INTELLIGENCE
When I use langchain&#39;s RAG method to search local txt, some content cannot be searched
When I use langchain&#39;s RAG method to search local txt, some content cannot be searched When I use langchain's RAG method to search local txt, some content cannot be searched. Every time I change chunk_size, the content that cannot be searched will be different.The content in the file is Chinese. The TextLoader can...
https://stackoverflow.com/questions/78977938/when-i-use-langchains-rag-method-to-search-local-txt-some-content-cannot-be-se
python, langchain, large-language-model, rag
1,726,140,559
se_78980003
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to track and evaluate LLM Models from Amazon Bedrock (e.g., Claude) with MLflow?
How to track and evaluate LLM Models from Amazon Bedrock (e.g., Claude) with MLflow? I know I can use MLflow to track LLM models and evaluate their performance. For OpenAI models, I can use the following code snippet to log the model and evaluate it: with mlflow.start_run() as run: system_prompt = "Answer the foll...
https://stackoverflow.com/questions/78980003/how-to-track-and-evaluate-llm-models-from-amazon-bedrock-e-g-claude-with-mlf
amazon-web-services, large-language-model, mlflow, amazon-bedrock
1,726,176,512
se_78793180
stackoverflow
ARTIFICIAL_INTELLIGENCE
Load Phi 3 small on Nvidia Tesla V100 - Flash Attention
Load Phi 3 small on Nvidia Tesla V100 - Flash Attention I would like to inquire about the possibility of uploading and fine tuning a Phi 3 8k small. When I load the model, I get an error about missing Flash attention. If I want to install the given package, I get this error : RuntimeError: FlashAttention is only suppo...
https://stackoverflow.com/questions/78793180/load-phi-3-small-on-nvidia-tesla-v100-flash-attention
gpu, large-language-model, huggingface, slm-phi3
1,721,908,899
se_78973151
stackoverflow
ARTIFICIAL_INTELLIGENCE
How can I make langchain handle larger files to process
How can I make langchain handle larger files to process I have the following code: from langchain_community.document_loaders.csv_loader import CSVLoader from langchain.text_splitter import RecursiveCharacterTextSplitter # from langchain_community.embeddings import HuggingFaceEmbeddings from langchain_huggingface impor...
https://stackoverflow.com/questions/78973151/how-can-i-make-langchain-handle-larger-files-to-process
csv, langchain, large-language-model
1,726,048,578
se_78969167
stackoverflow
ARTIFICIAL_INTELLIGENCE
Text summarizer with llama model using promptTemplates
Text summarizer with llama model using promptTemplates Hello I am working on a college project, it's about note summarizer using Llama 2. Problem: Takes too much time to generate a response (more than 2 minutes). What did I try to solve it: Initially, I was using the llama 2 models (https://huggingface.co/TheBloke/...
https://stackoverflow.com/questions/78969167/text-summarizer-with-llama-model-using-prompttemplates
large-language-model, ctransformers
1,725,966,172
se_78966943
stackoverflow
ARTIFICIAL_INTELLIGENCE
How are the weights of the Mistral models reinitialized in Huggingface?
How are the weights of the Mistral models reinitialized in Huggingface? From How does one reinitialize the weights of a Hugging Face LLaMA v2 model the official way as the original model? and https://discuss.huggingface.co/t/how-does-one-reinitialize-the-weights-of-a-hugging-face-llama-v2-model-the-official-way-as-the...
https://stackoverflow.com/questions/78966943/how-are-the-weights-of-the-mistral-models-reinitialized-in-huggingface
nlp, huggingface-transformers, large-language-model, mistral-7b
1,725,909,952
se_78960441
stackoverflow
ARTIFICIAL_INTELLIGENCE
LLaMA 3.1 Fine-tuning with QLoRA - CUDA Out of Memory Error
LLaMA 3.1 Fine-tuning with QLoRA - CUDA Out of Memory Error I'm trying to fine-tune the LLaMA 3.1 8 billion parameters model using the QLoRA technique with the help of the 4-bit bitsandbytes library on a mental health conversations dataset from Hugging Face. However, when I run the code, I'm encountering a torch.cuda....
https://stackoverflow.com/questions/78960441/llama-3-1-fine-tuning-with-qlora-cuda-out-of-memory-error
nlp, artificial-intelligence, large-language-model, llama, fine-tuning
1,725,721,026
se_78970525
stackoverflow
ARTIFICIAL_INTELLIGENCE
As I&#39;m working on Gemini AI and I encounter a issue for token limit
As I&#39;m working on Gemini AI and I encounter a issue for token limit I need to load a file and ask the Gemini LLM to answer the questions regrading from the loaded file. I need to inject a 19kb JSON file. When I try to ingest the file, it says: "raise exceptions.from_grpc_error(exc) from exc google.api_core.excepti...
https://stackoverflow.com/questions/78970525/as-im-working-on-gemini-ai-and-i-encounter-a-issue-for-token-limit
large-language-model, google-gemini
1,725,986,937
se_78942031
stackoverflow
ARTIFICIAL_INTELLIGENCE
Langchain returning answers out of context
Langchain returning answers out of context I am trying to build a tool where the users can upload a file to my hosted vectorDb in Qdrant and then they can ask question only about that file. My tech stack includes python, streamlit, langchain, vectordb and openai api. Right now is working well but if for example I have...
https://stackoverflow.com/questions/78942031/langchain-returning-answers-out-of-context
python, openai-api, large-language-model, py-langchain, vector-database
1,725,310,818
se_78959524
stackoverflow
ARTIFICIAL_INTELLIGENCE
Using LCEL with Memory
Using LCEL with Memory I had a LLMChain which I want to change now with LCEL to have proper support for streaming. My original chain was: llm_chain = LLMChain( llm=llm_chat, prompt=prompt, output_key="answer", verbose=False, ) My updated chain is: retrieved_chat...
https://stackoverflow.com/questions/78959524/using-lcel-with-memory
python, openai-api, langchain, large-language-model
1,725,690,986
se_78338438
stackoverflow
ARTIFICIAL_INTELLIGENCE
Reading Documents Directly from Llama Index as Files Instead of Specifying a Folder Path
Reading Documents Directly from Llama Index as Files Instead of Specifying a Folder Path I'm using llama index and want to directly read documents as files instead of specifying the folder path as described in the official documentation. The current method assumes that llama index users always have a downloaded file i...
https://stackoverflow.com/questions/78338438/reading-documents-directly-from-llama-index-as-files-instead-of-specifying-a-fol
nlp, openai-api, large-language-model, llama, llama-index
1,713,329,536
se_78956198
stackoverflow
ARTIFICIAL_INTELLIGENCE
open Webui : how to create a new chat, sending a question and getting the answer with python
open Webui : how to create a new chat, sending a question and getting the answer with python I use open webui to manage different LLM Model. I would like to use it as my central point for llm management. For example if I code a python function to connect to a model, I juste have to change de LLM model name to test ano...
https://stackoverflow.com/questions/78956198/open-webui-how-to-create-a-new-chat-sending-a-question-and-getting-the-answer
python, large-language-model
1,725,609,780
se_78904449
stackoverflow
ARTIFICIAL_INTELLIGENCE
Integrating input rails and output rails into chat bot via Runnable Rails
Integrating input rails and output rails into chat bot via Runnable Rails I've been working on developing and safeguarding a chat bot based on RAG - model and NeMo - Guardrails. I'm trying to integrate output rails alongside input rails. But I'm having trouble while doing so. The issue lies in YAML and COLANG contents...
https://stackoverflow.com/questions/78904449/integrating-input-rails-and-output-rails-into-chat-bot-via-runnable-rails
chatbot, large-language-model, rag
1,724,391,872
se_78815643
stackoverflow
ARTIFICIAL_INTELLIGENCE
Stream output using VLLM
Stream output using VLLM I am working on a RAG app, where I use LLMs to analyze various documents. I'm looking to improve the UX by streaming responses in real time. a snippet of my code: params = SamplingParams(temperature=TEMPERATURE,                     min_tokens=128,                     max_tokens=1024)...
https://stackoverflow.com/questions/78815643/stream-output-using-vllm
python, deployment, large-language-model, retrieval-augmented-generation, vllm
1,722,419,688
se_78951491
stackoverflow
ARTIFICIAL_INTELLIGENCE
Is there a way to implement multiple csv&#39;s as RAG?
Is there a way to implement multiple csv&#39;s as RAG? I recently uploaded a csv and wanted to create a project to analyze the csv with llm. However, I don't know which RAG to use for RAG through the csv file. In addition, the resources of the csv file are numbers, not natural language, so it seems too difficult to dr...
https://stackoverflow.com/questions/78951491/is-there-a-way-to-implement-multiple-csvs-as-rag
langchain, large-language-model, rag, dspy
1,725,516,256
se_78951976
stackoverflow
ARTIFICIAL_INTELLIGENCE
Slow GPT4All with Python SDK
Slow GPT4All with Python SDK I'm trying to run some analysis on thousands of text files, and I would like to use gtp4all (In python) to provide some responses. I've been trying to use the model on a sample text file here. Here's my code: llama_path = r"C:\Users\User\AppData\Local\nomic.ai\GPT4All\Meta-Llama-3.1-8B-Ins...
https://stackoverflow.com/questions/78951976/slow-gpt4all-with-python-sdk
python, nlp, artificial-intelligence, large-language-model, gpt4all
1,725,524,340
se_78952522
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to extract information from a photo of a document
How to extract information from a photo of a document I want to build a simple tool that will allow a user to take a photo of a document and extract information such as date/time and some other information It is simple to do this through Chat GPT's UI, upload an image, ask it for some information from the document. Bu...
https://stackoverflow.com/questions/78952522/how-to-extract-information-from-a-photo-of-a-document
artificial-intelligence, openai-api, large-language-model
1,725,531,769
se_78905550
stackoverflow
ARTIFICIAL_INTELLIGENCE
NeMo-Guaradrails responding to Denied topics
NeMo-Guaradrails responding to Denied topics I am trying to use NeMo-Guardrails in chat application for security purpose. But somehow it's responding to denied topics. Below is my config.yml file and rails.co file contents : config.yml models: - type: main engine: openai model: gpt-3.5-turbo instructions: ...
https://stackoverflow.com/questions/78905550/nemo-guaradrails-responding-to-denied-topics
large-language-model
1,724,410,419
se_78617039
stackoverflow
ARTIFICIAL_INTELLIGENCE
ModuleNotFoundError: No module named &#39;llama&#39;
ModuleNotFoundError: No module named &#39;llama&#39; I'm trying to execute the following piece of code: import itertools import jsonlines from datasets import load_dataset from pprint import pprint from llama import BasicModelRunner from transformers import AutoTokenizer, AutoModelForCausalLM from transformers impor...
https://stackoverflow.com/questions/78617039/modulenotfounderror-no-module-named-llama
python, large-language-model, fine-tuning
1,718,271,229
se_78948247
stackoverflow
ARTIFICIAL_INTELLIGENCE
Gradio How to add user avatar in chat interface
Gradio How to add user avatar in chat interface I have a very basic code for Gradio chat interface, how can i add user avatar in Gradio chat interface import gradio as gr import random import time with gr.Blocks(theme=gr.themes.Soft()) as demo: chatbot = gr.Chatbot() msg = gr.Textbox() clear = gr.ClearBut...
https://stackoverflow.com/questions/78948247/gradio-how-to-add-user-avatar-in-chat-interface
python, chatbot, large-language-model, gradio
1,725,447,281
se_76765834
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to connect LLM to Multiple SQL database with LangChain SQLChain
How to connect LLM to Multiple SQL database with LangChain SQLChain I want to connect LLM to more than 2 SQL database with SQLDatabaseChain. Please let me know if it is possible or any other way. I have connected to 1 DB and able to work. But I need to connect to more than 1 DB and its table
https://stackoverflow.com/questions/76765834/how-to-connect-llm-to-multiple-sql-database-with-langchain-sqlchain
artificial-intelligence, langchain, large-language-model
1,690,312,195
se_78945591
stackoverflow
ARTIFICIAL_INTELLIGENCE
Building production level RAG for csv files
Building production level RAG for csv files I am tasked to build a production level RAG application over CSV files. Possible Approches: Embedding --> VectorDB --> Taking user query --> Similarity or Hybrid Search --> LLM --> Result Csv to pandas df --> Ask LLM for py code to query from user prompt --> Query in df -->...
https://stackoverflow.com/questions/78945591/building-production-level-rag-for-csv-files
python, csv, large-language-model, rag
1,725,387,103
se_76198051
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to add new tokens to an existing Huggingface tokenizer?
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 "quirks when using existing tokenizers". And then it points to th...
https://stackoverflow.com/questions/76198051/how-to-add-new-tokens-to-an-existing-huggingface-tokenizer
python, nlp, huggingface-transformers, huggingface-tokenizers, large-language-model
1,683,528,092
se_78491482
stackoverflow
ARTIFICIAL_INTELLIGENCE
While using ObjectBox as a Vectorstore I got this error: &quot;CoreException: 10001 (ILLEGAL_STATE) - Cannot open store&quot; What should I do?
While using ObjectBox as a Vectorstore I got this error: &quot;CoreException: 10001 (ILLEGAL_STATE) - Cannot open store&quot; What should I do? I was trying to make a simple Q/A app with RAG with ObjectBox as the vector store. I have This is the code I was using: import streamlit as st import os from langchain_groq im...
https://stackoverflow.com/questions/78491482/while-using-objectbox-as-a-vectorstore-i-got-this-error-coreexception-10001
large-language-model, objectbox, retrieval-augmented-generation
1,715,878,799
se_78623385
stackoverflow
ARTIFICIAL_INTELLIGENCE
JsonOutputParser error while querying through create_retrieval_chain in langchain
JsonOutputParser error while querying through create_retrieval_chain in langchain I am creating a django API where it takes a pdf doc and using RAG, a query is made to the doc and the output is generated via LLM. I want the output as json and I am using jsonoutputparser but I am getting an error while parsing to json....
https://stackoverflow.com/questions/78623385/jsonoutputparser-error-while-querying-through-create-retrieval-chain-in-langchai
python, langchain, large-language-model, jsonparser, retrieval-augmented-generation
1,718,373,380
se_77713816
stackoverflow
ARTIFICIAL_INTELLIGENCE
Gemini API : Error when calling .generate_content(prompt)
Gemini API : Error when calling .generate_content(prompt) I am rather new to developing with LLMs. I am trying to write an RAG based app in Streamlit with Gemini's API using google embeddings. The goal of the app is to retrieve information from PDFs (which is my RAG's knowledge base) when answering the user's requests...
https://stackoverflow.com/questions/77713816/gemini-api-error-when-calling-generate-contentprompt
openai-api, large-language-model, faiss, openaiembeddings, google-gemini
1,703,510,778
se_78936892
stackoverflow
ARTIFICIAL_INTELLIGENCE
Langchain create_react_agent stream stopped on the very first AIMessage and doesn&#39;t provide the full answer
Langchain create_react_agent stream stopped on the very first AIMessage and doesn&#39;t provide the full answer I have followed the officiel langchain documentation https://js.langchain.com/v0.2/docs/tutorials/sql_qa to create an llm react agent that can query sqlite database: `agent_executor = create_react_agent(chat...
https://stackoverflow.com/questions/78936892/langchain-create-react-agent-stream-stopped-on-the-very-first-aimessage-and-does
python, langchain, large-language-model
1,725,179,567
se_78183380
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to pass max_token_to_sample parameter when using boto3 to access AWS bedrock model with Knowledgebase
How to pass max_token_to_sample parameter when using boto3 to access AWS bedrock model with Knowledgebase I have this piece of code working to access AWS Bedrock models with a knowledge base: aws_session = boto3.Session( bedrock_agent_client = aws_session.client(service_name="bedrock-agent-runtime", region_nam...
https://stackoverflow.com/questions/78183380/how-to-pass-max-token-to-sample-parameter-when-using-boto3-to-access-aws-bedrock
large-language-model, amazon-bedrock
1,710,801,675
se_78936979
stackoverflow
ARTIFICIAL_INTELLIGENCE
Issue Loading GGUF Model with ctransformers: RuntimeError on from_pretrained()
Issue Loading GGUF Model with ctransformers: RuntimeError on from_pretrained() I'm trying to load a GGUF model (Hermes-3-Llama-3.1-8B.Q4_K_M.gguf) using the ctransformers Python package. I'm using the following code: from ctransformers import AutoModelForCausalLM llm = AutoModelForCausalLM.from_pretrained("Hermes-3-L...
https://stackoverflow.com/questions/78936979/issue-loading-gguf-model-with-ctransformers-runtimeerror-on-from-pretrained
large-language-model, ctransformers, hermes
1,725,182,377
se_78911891
stackoverflow
ARTIFICIAL_INTELLIGENCE
Could not parse ModelProto from Meta-Llama-3.1-8B-Instruct/tokenizer.model
Could not parse ModelProto from Meta-Llama-3.1-8B-Instruct/tokenizer.model I tried to use Llama 3.1 without relying on external programs, but I was not successful. I downloaded the Meta-Llama-3.1-8B-Instruct model, which includes only the files consolidated.00.pth, params.json, and tokenizer.model. The params.json fil...
https://stackoverflow.com/questions/78911891/could-not-parse-modelproto-from-meta-llama-3-1-8b-instruct-tokenizer-model
python, large-language-model, llama
1,724,608,597
se_78873651
stackoverflow
ARTIFICIAL_INTELLIGENCE
Extract text using llama3.1
Extract text using llama3.1 I'm new to llama and prompting in general, and would appreciate some help here. Basically I am trying to use llama (8B with ollama) to extract a section from a long text. I used a prompt like this one: I have a long document, and I need to extract a specific section titled ‘Introduction’. ...
https://stackoverflow.com/questions/78873651/extract-text-using-llama3-1
large-language-model, llama
1,723,696,458
se_78730116
stackoverflow
ARTIFICIAL_INTELLIGENCE
CrewAI tool is caching my response. How do I disable it
CrewAI tool is caching my response. How do I disable it I have created a custom tool in CrewAI to request human for information. I created this tool as I found it extremely useful to include human in the loop situations. But I'm facing one issue. Every time the tool is called to elicit some input from the human, the f...
https://stackoverflow.com/questions/78730116/crewai-tool-is-caching-my-response-how-do-i-disable-it
caching, large-language-model, agent, multi-agent, crewai
1,720,608,945
se_78660308
stackoverflow
ARTIFICIAL_INTELLIGENCE
What can I input under the Object type in Azure Ai Studio&#39;s Prompt Flow?
What can I input under the Object type in Azure Ai Studio&#39;s Prompt Flow? Not sure if it's mentioned in any official documentation but what can I input in Azure Ai Studio's prompt flow that has the "Object" type? Can I put a file as an "Object" input? If yes, how do I do it?
https://stackoverflow.com/questions/78660308/what-can-i-input-under-the-object-type-in-azure-ai-studios-prompt-flow
azure, large-language-model, azure-openai, azure-ai, azure-promptflow
1,719,194,484
se_78932079
stackoverflow
ARTIFICIAL_INTELLIGENCE
Matmul-free LLM ternary weights?
Matmul-free LLM ternary weights? I've been reading "Scalable MatMul-free Language Modeling" that uses ternary weights. I wanted to inspect the weights, so I did the following: from safetensors import safe_open from huggingface_hub import hf_hub_download # Change here to your model name name = 'ridger/MMfreeLM-370M' ...
https://stackoverflow.com/questions/78932079/matmul-free-llm-ternary-weights
large-language-model
1,725,022,179
se_78926784
stackoverflow
ARTIFICIAL_INTELLIGENCE
ImportError: cannot import name &#39;Gemini&#39; from &#39;llama_index.llms&#39; (unknown location)
ImportError: cannot import name &#39;Gemini&#39; from &#39;llama_index.llms&#39; (unknown location) This is the code !pip install google-generativeai !pip install llama-index-llms-gemini !pip install llama-index llama-index-llms-gemini from llama_index.core import VectorStoreIndex, StorageContext from llama_index.co...
https://stackoverflow.com/questions/78926784/importerror-cannot-import-name-gemini-from-llama-index-llms-unknown-locati
chatbot, large-language-model, llama-index, google-gemini, google-generativeai
1,724,919,273
se_78918971
stackoverflow
ARTIFICIAL_INTELLIGENCE
Inference workflow in compile mode using transformers.pipeline()
Inference workflow in compile mode using transformers.pipeline() I am trying to run an inference workflow of a Llama model in compile mode using transformers.pipeline(). I am using the following line of codes to run the inference workflow in compile mode: model = LlamaForCausalLM.from_pretrained("meta-llama/Meta-Llama...
https://stackoverflow.com/questions/78918971/inference-workflow-in-compile-mode-using-transformers-pipeline
python, large-language-model, transformer-model, huggingface
1,724,762,840
se_78919818
stackoverflow
ARTIFICIAL_INTELLIGENCE
Embedding using the LangChain_AWS is giving None value
Embedding using the LangChain_AWS is giving None value I am trying to embed a text using the langchain_aws BedrockEmbeddings, but when I invoke the function, I get a list with the None values. Here's the code: from langchain_community.llms.bedrock import Bedrock from langchain_aws import BedrockEmbeddings import boto...
https://stackoverflow.com/questions/78919818/embedding-using-the-langchain-aws-is-giving-none-value
python, langchain, large-language-model, embedding, amazon-bedrock
1,724,774,702
se_78925332
stackoverflow
ARTIFICIAL_INTELLIGENCE
Debugging Dynamic Few Shot Langchain Code
Debugging Dynamic Few Shot Langchain Code # Import necessary modules and classes from langchain_community and langchain_core from langchain_community.vectorstores import Chroma from langchain_core.example_selectors import SemanticSimilarityExampleSelector from langchain_openai import OpenAIEmbeddings ## paid from la...
https://stackoverflow.com/questions/78925332/debugging-dynamic-few-shot-langchain-code
large-language-model, py-langchain, chromadb
1,724,880,254
se_78915634
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to Fine-Tune mBART or mT5 for Transliteration from Romanized Text to Native Script?
How to Fine-Tune mBART or mT5 for Transliteration from Romanized Text to Native Script? I'm working on a project that involves converting Romanized text (where the characters are in the Latin alphabet) into its corresponding native script. Specifically, I'm dealing with Romanized Hindi (e.g., "aap kaise hain?") and ne...
https://stackoverflow.com/questions/78915634/how-to-fine-tune-mbart-or-mt5-for-transliteration-from-romanized-text-to-native
large-language-model, transformer-model, fine-tuning, transliteration
1,724,692,616
se_78909848
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to generate .tflite models form Qualcomm AI Hub Models
How to generate .tflite models form Qualcomm AI Hub Models I have a Qualcomm device and I want to deploy LLMs on it. I want to get .tflite model. I downloaded an Android app from Google AI which can deploy tensorflow lite models, while it only accepts .tflite file. And I cannot find a website to directly download .tfl...
https://stackoverflow.com/questions/78909848/how-to-generate-tflite-models-form-qualcomm-ai-hub-models
android, artificial-intelligence, large-language-model, tflite, qualcomm
1,724,528,149
se_78922749
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to save the best model after running hyperparameter_search with Hugging Face Transformers?
How to save the best model after running hyperparameter_search with Hugging Face Transformers? I'm currently doing hyperparameter tuning by using the 'hyperparameter_search' function from the Transformers library. However, the process run completely, but I'm curious on how can I save the best model from the 'hyperpara...
https://stackoverflow.com/questions/78922749/how-to-save-the-best-model-after-running-hyperparameter-search-with-hugging-face
huggingface-transformers, large-language-model, hyperparameters, fine-tuning, huggingface-trainer
1,724,840,051
se_78921530
stackoverflow
ARTIFICIAL_INTELLIGENCE
langchain ollama module difference
langchain ollama module difference I'm making a chatbot using langchain and Ollama inference, but after some research I see some different module import such as: from langchain.llms.ollama import Ollama model = Ollama(model="llama3") another example: from langchain_community.llms import Ollama ollama = Ollama(model...
https://stackoverflow.com/questions/78921530/langchain-ollama-module-difference
python, langchain, large-language-model, ollama
1,724,819,095
se_78309262
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to install and run Ollama server in AWS Kubernetes cluster (EKS)?
How to install and run Ollama server in AWS Kubernetes cluster (EKS)? I can install and run Ollama service with GPU in an EC2 instance and make API calls to it from a web app in the following way: First I need to create a docker network, so that the Ollama service and my web app share the same docker network: docker n...
https://stackoverflow.com/questions/78309262/how-to-install-and-run-ollama-server-in-aws-kubernetes-cluster-eks
amazon-web-services, kubernetes, amazon-eks, large-language-model, ollama
1,712,826,606
se_78916043
stackoverflow
ARTIFICIAL_INTELLIGENCE
What is the exact vocab size of the Mistral-Nemo-Instruct-2407 tokenizer model?
What is the exact vocab size of the Mistral-Nemo-Instruct-2407 tokenizer model? From the docs, it's Vocabulary size: 2**17 ~= 128k But what is the exact vocab size of the Mistral-Nemo-Instruct-2407 tokenizer model?
https://stackoverflow.com/questions/78916043/what-is-the-exact-vocab-size-of-the-mistral-nemo-instruct-2407-tokenizer-model
huggingface-transformers, tokenize, large-language-model, mistral-ai
1,724,700,650
se_78865593
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to train a model using a text dataset
How to train a model using a text dataset I want to create an AI model that generates text. Specifically, BDD Gherkin cucumber scenarios and step definitions based of input of a user story. User story with BDD Gherkin cucumber example For example. User story (Input): I want to add products to my shopping basket on an ...
https://stackoverflow.com/questions/78865593/how-to-train-a-model-using-a-text-dataset
machine-learning, deep-learning, large-language-model, unsupervised-learning, text-generation
1,723,543,143
se_78912813
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to incorporate large knowledge base to LLM?
How to incorporate large knowledge base to LLM? I am building a AI assistant that help to analyze some documents. The issue is: I have a large common knowledge base (all in PDFs, that provide fundamental knowledge of the domain). I have a smaller, specific file (PDF also) that contains the problem description that we...
https://stackoverflow.com/questions/78912813/how-to-incorporate-large-knowledge-base-to-llm
large-language-model
1,724,644,380
se_77444570
stackoverflow
ARTIFICIAL_INTELLIGENCE
Deploy LLM using Sagemaker and Langchain
Deploy LLM using Sagemaker and Langchain I am trying to deploy Generative AI solution built using Langchain (obviously with LLM at it's core) and Sagemaker. So, the code is not just an inference script but an inference pipeline (it has RAG app). It has to keep the model loaded for inference. Inference of LLM itself is...
https://stackoverflow.com/questions/77444570/deploy-llm-using-sagemaker-and-langchain
streaming, amazon-sagemaker, endpoint, large-language-model
1,699,438,146
se_78915355
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to present the model&#39;s response content when using Few-shot prompting with function calling in LangChain and GPT-4 API?
How to present the model&#39;s response content when using Few-shot prompting with function calling in LangChain and GPT-4 API? I referred to an example from LangChain about using few-shot prompting along with function calling for my project. The following code snippet is taken from LangChain's documentation: from lan...
https://stackoverflow.com/questions/78915355/how-to-present-the-models-response-content-when-using-few-shot-prompting-with-f
python, openai-api, langchain, large-language-model, chatgpt-function-call
1,724,687,999
se_78875978
stackoverflow
ARTIFICIAL_INTELLIGENCE
Error using LlmFactory with &quot;TheBloke/OpenHermes-2.5-Mistral-7B-GGUF&quot; Huggingface
Error using LlmFactory with &quot;TheBloke/OpenHermes-2.5-Mistral-7B-GGUF&quot; Huggingface I tried replicating a simple Python code to create a small LLM model. I have macOS M1 machine. I created a separate environment where I installed Pytorch and llama-cpp-python. The code: from llmflex import LlmFactory # Load th...
https://stackoverflow.com/questions/78875978/error-using-llmfactory-with-thebloke-openhermes-2-5-mistral-7b-gguf-huggingfac
python, pytorch, metal, large-language-model, huggingface
1,723,738,305
se_78173243
stackoverflow
ARTIFICIAL_INTELLIGENCE
Vector store created using existing graph for multiple nodes/labels
Vector store created using existing graph for multiple nodes/labels Am trying to create vector stores on top of my existing KG using from_existing_graph, (followed tomaz and Saurav Joshi neo4j blog posts) - this method is allowing me to create embedding/vector index only for single label due to which am unable to get...
https://stackoverflow.com/questions/78173243/vector-store-created-using-existing-graph-for-multiple-nodes-labels
neo4j, openai-api, langchain, large-language-model
1,710,621,497
se_78912227
stackoverflow
ARTIFICIAL_INTELLIGENCE
TypeError: Expected a Runnable, callable or dict.Instead got an unsupported type: &lt;class &#39;list&#39;&gt;
TypeError: Expected a Runnable, callable or dict.Instead got an unsupported type: &lt;class &#39;list&#39;&gt; I am experimenting with LLM development. Here is my code: import langchain, pydantic, transformers from langchain import HuggingFacePipeline from langchain_core.prompts import PromptTemplate from langchain_co...
https://stackoverflow.com/questions/78912227/typeerror-expected-a-runnable-callable-or-dict-instead-got-an-unsupported-type
python, langchain, runnable, large-language-model, huggingface
1,724,618,418
se_78906057
stackoverflow
ARTIFICIAL_INTELLIGENCE
Is it possible to use a langchain agent to retrieve data indexed with llamaIndex?
Is it possible to use a langchain agent to retrieve data indexed with llamaIndex? From my understanding, Langchain is better at making agents & LlamaIndex is better at indexing. Is it possible to mix them? To use a langchain agent to retrieve data indexed with llamaIndex?
https://stackoverflow.com/questions/78906057/is-it-possible-to-use-a-langchain-agent-to-retrieve-data-indexed-with-llamaindex
langchain, large-language-model, llama-index
1,724,418,036
se_78274596
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to use LLM for SQL generation over highly normalized data model
How to use LLM for SQL generation over highly normalized data model If a database table is highly normalized (no semantic column names), what instructions and context can we provide to an LLM to generate proper queries to answer user questions. The schema alone will not be sufficient to provide full context to LLM. As...
https://stackoverflow.com/questions/78274596/how-to-use-llm-for-sql-generation-over-highly-normalized-data-model
large-language-model, llm-sql-generation
1,712,241,293
se_78909842
stackoverflow
ARTIFICIAL_INTELLIGENCE
How can I use the Llama 3.1 model in my app without using an API?
How can I use the Llama 3.1 model in my app without using an API? I want to use the Llama 3.1 8B LLM in my web app without relying on any external API. I believe that models in GGUF format are best suited for my needs. My plan is to use the user's CPU for text generation. I think this is feasible because I was able to...
https://stackoverflow.com/questions/78909842/how-can-i-use-the-llama-3-1-model-in-my-app-without-using-an-api
javascript, web-applications, large-language-model, llama, llama3.1
1,724,527,984
se_78138097
stackoverflow
ARTIFICIAL_INTELLIGENCE
create custom embedding function in chromadb for semantic search
create custom embedding function in chromadb for semantic search I have the python 3 code below. I have chromadb vector database and I'm trying to create embeddings for chunks of text like the example below, using a custom embedding function. My end goal is to do semantic search of a collection I create from these t...
https://stackoverflow.com/questions/78138097/create-custom-embedding-function-in-chromadb-for-semantic-search
python-3.x, large-language-model, sentence-transformers, chromadb
1,710,122,523
se_78905356
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to properly quantize model with quanto?
How to properly quantize model with quanto? I am trying to quantize Qwen model, but it seems to be not working. This is my snippet in Google Colab (runtime-> free T4 GPU): from transformers import AutoModelForCausalLM from optimum.quanto import QuantizedModelForCausalLM, qint8 model = AutoModelForCausalLM.from_pretra...
https://stackoverflow.com/questions/78905356/how-to-properly-quantize-model-with-quanto
python, pytorch, huggingface-transformers, large-language-model
1,724,407,745
se_76940597
stackoverflow
ARTIFICIAL_INTELLIGENCE
Getting Peft Version Error while Autotrain Finetune on Llama 2
Getting Peft Version Error while Autotrain Finetune on Llama 2 i did some Llama 2 finetuning with autotrain, on google colab. this is a sample text column, for fine tuning ###Human: Here is the OCR Text extracted from a VHS tape cover. Yes, the text is surely extracted from a VHS tape, but it may have some typos and w...
https://stackoverflow.com/questions/76940597/getting-peft-version-error-while-autotrain-finetune-on-llama-2
huggingface, large-language-model, llama, fine-tuning
1,692,552,622
se_77725437
stackoverflow
ARTIFICIAL_INTELLIGENCE
PEFT QLoRA training on Llama 2
PEFT QLoRA training on Llama 2 I am trying to perform PEFT QLoRA on Llama 2 specifically on imdb movie review dataset. I am using only 650 samples for training and 650 samples for testing. I have used "meta-llama/Llama-2-7b-chat-hf" model as my base llama 2 model. after i train with SFTTrainer, i save the model to a d...
https://stackoverflow.com/questions/77725437/peft-qlora-training-on-llama-2
machine-learning, pytorch, large-language-model, llama, peft
1,703,746,901
se_78902349
stackoverflow
ARTIFICIAL_INTELLIGENCE
Control Length of Response of LLM Model
Control Length of Response of LLM Model Tried: Create a Prompt that would make my model answer in 30 words or less. Received: Sometimes short, sometimes long answer. Expcted: Consistent short words even when using RAG. I'm trying to create an english tutor chatbot that will produce answers with 30 or less words using ...
https://stackoverflow.com/questions/78902349/control-length-of-response-of-llm-model
artificial-intelligence, prompt, large-language-model, amazon-bedrock, claude
1,724,340,115
se_78684684
stackoverflow
ARTIFICIAL_INTELLIGENCE
pass recent history to LLM with current prompt
pass recent history to LLM with current prompt I have the azure openai code below that I am running in python 3.10. In the bot_response function I am passing a query in from the user and getting a response from the LLM. I would like to modify the code so that when being prompted the LLM will get the full history of ...
https://stackoverflow.com/questions/78684684/pass-recent-history-to-llm-with-current-prompt
python-3.x, large-language-model, azure-openai
1,719,615,661
se_78356949
stackoverflow
ARTIFICIAL_INTELLIGENCE
A100 Problem: CUDA error: device-side assert triggered CUDA kernel errors might be asynchronously reported at some other API call
A100 Problem: CUDA error: device-side assert triggered CUDA kernel errors might be asynchronously reported at some other API call I have 4 A100 80G GPU. I always meet error when I use device_map="auto" The error is : CUDA error: device-side assert triggered CUDA kernel errors might be asynchronously reported at some ...
https://stackoverflow.com/questions/78356949/a100-problem-cuda-error-device-side-assert-triggered-cuda-kernel-errors-might
pytorch, gpu, huggingface-transformers, large-language-model, llama
1,713,585,728
se_78233477
stackoverflow
ARTIFICIAL_INTELLIGENCE
langchain RetrievalQA.from_chain_type not working. It&#39;s showing ValidationError: 1 validation error for LLMChain
langchain RetrievalQA.from_chain_type not working. It&#39;s showing ValidationError: 1 validation error for LLMChain Recently, I am facing a problem in the Langchain PromptTemplate. I'm using a Jupyter notebook. And I want to run this code, but it's showing ValidationError. Here is my code: from langchain_google_genai...
https://stackoverflow.com/questions/78233477/langchain-retrievalqa-from-chain-type-not-working-its-showing-validationerror
python, jupyter-notebook, langchain, large-language-model, google-generativeai
1,711,559,624
se_77864368
stackoverflow
ARTIFICIAL_INTELLIGENCE
AssertionError LLama-cpp-python model failed to load
AssertionError LLama-cpp-python model failed to load Llama-cpp-python gives me Assertion Error even though im using the GGUF Format. I am trying to run an AI model in python 3.7.2 with llama-cpp-python 0.1.85, everytime I run this my code I get this error: error loading model: MapViewOfFile failed: Not enough memory r...
https://stackoverflow.com/questions/77864368/assertionerror-llama-cpp-python-model-failed-to-load
python, python-3.x, machine-learning, large-language-model, llama
1,705,991,448
se_78335850
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to multiprocess/multithread documents loading in chromadb?
How to multiprocess/multithread documents loading in chromadb? I'm creating an application with langchain, chromadb and ollama with mistral model, where I have dozens of PDF files, each of them with a lot of pages. The problem is that It takes a lot of time (34min to get 30 PDF files in the vector database) and the st...
https://stackoverflow.com/questions/78335850/how-to-multiprocess-multithread-documents-loading-in-chromadb
python, langchain, large-language-model, chromadb
1,713,282,789