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_78656308 | stackoverflow | ARTIFICIAL_INTELLIGENCE | RAG framework not not working for many model listed "snowparkSQLException 1304 -- unknown model \snowflake-arctic" | RAG framework not not working for many model listed "snowparkSQLException 1304 -- unknown model \snowflake-arctic"
I am referring below RAG example to do some experiment with some private data(some sample pdf).
https://quickstarts.snowflake.com/guide/asking_questions_to_your_own_documents_with_snowflake_cort... | https://stackoverflow.com/questions/78656308/rag-framework-not-not-working-for-many-model-listed-snowparksqlexception-1304 | snowflake-cloud-data-platform, artificial-intelligence, large-language-model | 1,719,065,807 |
se_77338090 | stackoverflow | ARTIFICIAL_INTELLIGENCE | LLModel Error when trying to load a quantised LLM model from GPT4All on a MacBook Pro with M1 chip? | LLModel Error when trying to load a quantised LLM model from GPT4All on a MacBook Pro with M1 chip?
I installed the gpt4all python bindings on my MacBook Pro (M1 Chip) according to these instructions: https://github.com/nomic-ai/gpt4all/tree/main/gpt4all-bindings/python.
However, while trying out some models, I ran in... | https://stackoverflow.com/questions/77338090/llmodel-error-when-trying-to-load-a-quantised-llm-model-from-gpt4all-on-a-macboo | python-3.x, apple-m1, large-language-model, gpt4all, pygpt4all | 1,697,929,260 |
se_77309956 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Compare two strings by meaning using LLMs | Compare two strings by meaning using LLMs
I'd like to use some of the good large language models to estimate how similar the meanings of two strings are, for example "cat" and "someone who likes to play with yarn", or "cat" and "car".
Maybe some libraries provide a function for comparing strings, or we could implement... | https://stackoverflow.com/questions/77309956/compare-two-strings-by-meaning-using-llms | python, neural-network, artificial-intelligence, large-language-model | 1,697,553,432 |
se_78685861 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Optimizing an LLM Using DPO: nan Loss Values During Evaluation | Optimizing an LLM Using DPO: nan Loss Values During Evaluation
I want to optimize an LLM based on DPO. When I tried to train and evaluate the model, but there are nan values in the evaluation results.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from datasets import Dataset
from trl impo... | https://stackoverflow.com/questions/78685861/optimizing-an-llm-using-dpo-nan-loss-values-during-evaluation | python, huggingface-transformers, large-language-model, huggingface, huggingface-trainer | 1,719,661,040 |
se_78712878 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Size mismatch for embed_out.weight: copying a param with shape torch.Size([0]) from checkpoint - Huggingface PyTorch | Size mismatch for embed_out.weight: copying a param with shape torch.Size([0]) from checkpoint - Huggingface PyTorch
I want to finetune an LLM. I am able to successfully finetune LLM. But when reload the model after save, gets error. Below is the code
import argparse
import numpy as np
import torch
from datasets impor... | https://stackoverflow.com/questions/78712878/size-mismatch-for-embed-out-weight-copying-a-param-with-shape-torch-size0-f | pytorch, huggingface-transformers, large-language-model, huggingface | 1,720,204,156 |
se_78708887 | stackoverflow | ARTIFICIAL_INTELLIGENCE | NextJS v14 architecture to call a LLM | NextJS v14 architecture to call a LLM
In a NextJS v14 application, I need to call a proxy API that interacts with an LLM. The API returns an NDJSON response, which needs to be processed using the ndjsonStream function from the can-ndjson-stream npm library.
I have a client component with a form that sends a server act... | https://stackoverflow.com/questions/78708887/nextjs-v14-architecture-to-call-a-llm | next.js, stream, large-language-model, nextjs14, ndjson | 1,720,126,360 |
se_77200757 | stackoverflow | ARTIFICIAL_INTELLIGENCE | langchain callbacks StreamingStdOutCallbackHandler strips new line character | langchain callbacks StreamingStdOutCallbackHandler strips new line character
We were able to get a streaming response from LlamaCpp by using streaming=True and having CallbackManager([StreamingStdOutCallbackHandler()]).
But the issue is the streamed out put does not contain any new line characters which makes the stre... | https://stackoverflow.com/questions/77200757/langchain-callbacks-streamingstdoutcallbackhandler-strips-new-line-character | langchain, large-language-model, llama, llama-cpp-python | 1,695,978,956 |
se_78710019 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Concurrent/parallel requests with vLL, | Concurrent/parallel requests with vLL,
My question might be a bit basic, but I’m new to all of this and eager to learn.
I have build an app with FastAPI. Previously I used asyncio method to handle multiple request to llm, but with each new request it become slower in response. So I decide to use vLLM method, but I got... | https://stackoverflow.com/questions/78710019/concurrent-parallel-requests-with-vll | large-language-model, vllm, mixtral-8x7b | 1,720,161,960 |
se_78573678 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Streamlit calendar is not being displayed | Streamlit calendar is not being displayed
I am building a chatbot application in Streamlit that integrates with a calendar component. The calendar should be displayed when certain keywords are detected in the chatbot's response. However, I am running into issues where the calendar either doesn't display correctly or d... | https://stackoverflow.com/questions/78573678/streamlit-calendar-is-not-being-displayed | python, streamlit, large-language-model | 1,717,482,695 |
se_77671277 | stackoverflow | ARTIFICIAL_INTELLIGENCE | ValueError: Invalid pattern: '**' can only be an entire path component | ValueError: Invalid pattern: '**' can only be an entire path component
I am trying to fine tune a LLM
My code so far:
from datasets import load_dataset, DatasetDict, Dataset
from transformers import (
AutoTokenizer,
AutoConfig,
AutoModelForSequenceClassification,
DataCollatorWithPadding,
... | https://stackoverflow.com/questions/77671277/valueerror-invalid-pattern-can-only-be-an-entire-path-component | python, large-language-model, huggingface-datasets | 1,702,737,038 |
se_78255875 | stackoverflow | ARTIFICIAL_INTELLIGENCE | ValueError: You can't pass `load_in_4bit`or `load_in_8bit` as a kwarg when passing `quantization_config` argument at the same time | ValueError: You can't pass `load_in_4bit`or `load_in_8bit` as a kwarg when passing `quantization_config` argument at the same time
I'm currently fine-tuning the Mistral 7B model and encountered the following error:
ValueError: You cannot simultaneously pass the load_in_4bit or load_in_8bit arguments while also pas... | https://stackoverflow.com/questions/78255875/valueerror-you-cant-pass-load-in-4bitor-load-in-8bit-as-a-kwarg-when-passi | huggingface-transformers, large-language-model, quantization, mistral-7b | 1,711,979,725 |
se_78689873 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to fine-tune merlinite 7B model in Python | How to fine-tune merlinite 7B model in Python
I am new to LLM programming in Python and I am trying to fine-tune the instructlab/merlinite-7b-lab model on my Mac M1. My goal is to teach this model to a new music composer Xenobi Amilen I have invented.
The text of this composer is here.
Using the new Ilab CLI from RedH... | https://stackoverflow.com/questions/78689873/how-to-fine-tune-merlinite-7b-model-in-python | python, pytorch, huggingface-transformers, large-language-model, huggingface-tokenizers | 1,719,783,434 |
se_76990736 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Differences between Langchain & LlamaIndex | Differences between Langchain & LlamaIndex
I'm currently working on developing a chatbot powered by a Large Language Model (LLM), and I want it to provide responses based on my own documents. I understand that using a fine-tuned model on my documents might not yield direct responses, so I'm exploring the concept o... | https://stackoverflow.com/questions/76990736/differences-between-langchain-llamaindex | chatbot, langchain, large-language-model, llama-index | 1,693,207,352 |
se_78699889 | stackoverflow | ARTIFICIAL_INTELLIGENCE | ChromaDB terminates Flask without exception | ChromaDB terminates Flask without exception
I'm creating an API with Flask. The other side will send me a file and I will save it to chroma database on my side. Chroma.add will terminates my program without any exception. When I save a smaller file to it, it will be fine, when send a larger file it will crash. Firstly... | https://stackoverflow.com/questions/78699889/chromadb-terminates-flask-without-exception | large-language-model, chromadb, retrieval-augmented-generation | 1,719,974,724 |
se_78699723 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to Access Intermediate Steps of Langchain Agent React in Real-Time While Waiting for Final Response? | How to Access Intermediate Steps of Langchain Agent React in Real-Time While Waiting for Final Response?
I am working with the AgentReact from the Langchain library and I need to access and display the intermediate steps (interactions) in real-time while waiting for the final response. Currently, my code only returns ... | https://stackoverflow.com/questions/78699723/how-to-access-intermediate-steps-of-langchain-agent-react-in-real-time-while-wai | python, streamlit, langchain, large-language-model | 1,719,968,764 |
se_78690284 | stackoverflow | ARTIFICIAL_INTELLIGENCE | oobabooga-textgen-web-ui how to get authorization to view model list from port 5000 via the ooba's api-key in python | oobabooga-textgen-web-ui how to get authorization to view model list from port 5000 via the ooba's api-key in python
I wish to extract and print out a list of llm models from the oobabooga-text-gen-web-ui in python.
Some context first before i head over to my problem.
For those familiar with what ooba is its essen... | https://stackoverflow.com/questions/78690284/oobabooga-textgen-web-ui-how-to-get-authorization-to-view-model-list-from-port-5 | python, openai-api, large-language-model | 1,719,801,741 |
se_76461859 | stackoverflow | ARTIFICIAL_INTELLIGENCE | LMM Fine Tuning - Supervised Fine Tuning Trainer (SFTTrainer) vs transformers Trainer | LMM Fine Tuning - Supervised Fine Tuning Trainer (SFTTrainer) vs transformers Trainer
When should one opt for the Supervised Fine Tuning Trainer (SFTTrainer) instead of the regular Transformers Trainer when it comes to instruction fine-tuning for Language Models (LLMs)? From what I gather, the regular Transformers Tra... | https://stackoverflow.com/questions/76461859/lmm-fine-tuning-supervised-fine-tuning-trainer-sfttrainer-vs-transformers-tr | huggingface-transformers, huggingface, fine-tuning, large-language-model | 1,686,633,306 |
se_78697238 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Error in Ollama Functions js (Error(Failed to parse a function call from ${this.llm.model} output: ${chatGenerationContent})) | Error in Ollama Functions js (Error(Failed to parse a function call from ${this.llm.model} output: ${chatGenerationContent}))
Can you help me please with this , i try to use ollama to make a chat that can call tools in order to answer to the the user question, I use the same documentation in langachain langchain opena... | https://stackoverflow.com/questions/78697238/error-in-ollama-functions-js-errorfailed-to-parse-a-function-call-from-this | chat, langchain, large-language-model, ollama, langchain-js | 1,719,925,196 |
se_78590413 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Performing Function Calling with Mistral AI through Hugging Face Endpoint | Performing Function Calling with Mistral AI through Hugging Face Endpoint
I am trying to perform function calling using Mistral AI through the Hugging Face endpoint. Mistral AI requires input in a specific string format (assistant: ... \n user: ...). However, the input format provided is not accepted as a list of mess... | https://stackoverflow.com/questions/78590413/performing-function-calling-with-mistral-ai-through-hugging-face-endpoint | artificial-intelligence, large-language-model, huggingface, py-langchain, mistral-7b | 1,717,744,657 |
se_78688407 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to set eos_token_id in llama3 in HuggingFaceLLM? | How to set eos_token_id in llama3 in HuggingFaceLLM?
I wanna set my eos_token_id, and pad_token_id. I googled alot, and most are suggesting to use e.g. tokenizer.pad_token_id (like from here https://huggingface.co/meta-llama/Meta-Llama-3-8B/discussions/36). But the problem is my code doesn't have tokenizer initiation.... | https://stackoverflow.com/questions/78688407/how-to-set-eos-token-id-in-llama3-in-huggingfacellm | large-language-model, huggingface, huggingface-tokenizers, llama-index, llama3 | 1,719,745,905 |
se_78693678 | stackoverflow | ARTIFICIAL_INTELLIGENCE | HuggingFace pipeline doesn't use multiple GPUs | HuggingFace pipeline doesn't use multiple GPUs
I made a RAG app that basically answers user questions based on provided data, it works fine on GPU and a single GPU. I want to deploy it on multiple GPUs (4 T4s) but I always get CUDA out of Memory error on pipeline.
I tried using "auto" keyword too but Langchain doe... | https://stackoverflow.com/questions/78693678/huggingface-pipeline-doesnt-use-multiple-gpus | python, huggingface-transformers, langchain, large-language-model, huggingface | 1,719,857,695 |
se_78679269 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Milvus ConnectionRefusedError: how to connect locally | Milvus ConnectionRefusedError: how to connect locally
I am trying to run a RAG pipeline using haystack & Milvus.
Its my first time using Milvus, and I seem to have an issue with it.
I'm following this tutorial, with some basic changes: https://milvus.io/docs/integrate_with_haystack.md
Here is my code:
import os
import... | https://stackoverflow.com/questions/78679269/milvus-connectionrefusederror-how-to-connect-locally | python, database-connection, large-language-model, milvus, haystack | 1,719,511,772 |
se_78685685 | stackoverflow | ARTIFICIAL_INTELLIGENCE | when i am using langchain chatopenai model and invoking method it's working but when using in crewai same llm models it gives invalid api key | when i am using langchain chatopenai model and invoking method it's working but when using in crewai same llm models it gives invalid api key
import os
from langchain_openai import OpenAI
from langchain_openai import ChatOpenAI
from langchain.prompts import PromptTemplate
chat_model = ChatOpenAI( openai_api_base... | https://stackoverflow.com/questions/78685685/when-i-am-using-langchain-chatopenai-model-and-invoking-method-its-working-but | python-3.x, openai-api, large-language-model | 1,719,655,976 |
se_78612251 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do we add/modify the normalizer in a pretrained Huggingface tokenizer? | How do we add/modify the normalizer in a pretrained Huggingface tokenizer?
Given a Huggingface tokenizer that already have a normalizer, e.g. "mistralai/Mistral-7B-v0.1", we can do this to modify the normalizer
import json
from transformers import AutoTokenizer
from tokenizers.normalizers import Sequence, Replace, Pr... | https://stackoverflow.com/questions/78612251/how-do-we-add-modify-the-normalizer-in-a-pretrained-huggingface-tokenizer | python, nlp, large-language-model, huggingface-tokenizers | 1,718,190,239 |
se_78033871 | stackoverflow | ARTIFICIAL_INTELLIGENCE | While using Seq2SeqTrainingArguments function, This error is displayed: Using the `Trainer` with `PyTorch` requires `accelerate>=0.21.0` | While using Seq2SeqTrainingArguments function, This error is displayed: Using the `Trainer` with `PyTorch` requires `accelerate>=0.21.0`
I am trying to run the Google Colab notebook. Every step is well explained and easy to understand. But I have encountered a problem. while trying to run a specific part of code :
... | https://stackoverflow.com/questions/78033871/while-using-seq2seqtrainingarguments-function-this-error-is-displayed-using-th | python, pytorch, large-language-model, huggingface, huggingface-trainer | 1,708,517,274 |
se_78635798 | stackoverflow | ARTIFICIAL_INTELLIGENCE | The number of tokens that an image takes is quite large (~2000). Is this correct, or a potential bug? | The number of tokens that an image takes is quite large (~2000). Is this correct, or a potential bug?
I am looking at using phi-3-vision models to try and describe an image. However, I couldn't help but notice that the number of tokens that an image takes is quite large (~2000). Is this correct, or a potential bug? I ... | https://stackoverflow.com/questions/78635798/the-number-of-tokens-that-an-image-takes-is-quite-large-2000-is-this-correct | huggingface-transformers, large-language-model | 1,718,692,076 |
se_78684854 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Mistral7b response starts with an extra leading space when streamed with Ollama | Mistral7b response starts with an extra leading space when streamed with Ollama
When I stream the response of mistral7b LLM with Ollama, it has an extra space to the left on the very first streamed chunk. Below is my code:
import ollama
stream = ollama.chat(
model='mistral',
messages=[{'role': 'user', 'content': ... | https://stackoverflow.com/questions/78684854/mistral7b-response-starts-with-an-extra-leading-space-when-streamed-with-ollama | python, whitespace, large-language-model, ollama, mistral-7b | 1,719,623,426 |
se_78684319 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Is there a way to use CodeBERT to embed source code without natural language in input? | Is there a way to use CodeBERT to embed source code without natural language in input?
On CodeBERTS github they provide an example of using a NL-PL pair with the pretrained base model to create an embedding. I am looking to create an embedding using just source code which does not have natural language attached. This... | https://stackoverflow.com/questions/78684319/is-there-a-way-to-use-codebert-to-embed-source-code-without-natural-language-in | python, bert-language-model, large-language-model, word-embedding, cosine-similarity | 1,719,605,367 |
se_78639693 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Does duplicated data from denormalization affect the performance of vector searches? | Does duplicated data from denormalization affect the performance of vector searches?
In Cassandra, data are usually denormalized to match the query pattern. However, with vector columns, it means duplication of the same vectors. I know vector similarity search and index is very expensive. So will the large amount of d... | https://stackoverflow.com/questions/78639693/does-duplicated-data-from-denormalization-affect-the-performance-of-vector-searc | database, cassandra, data-modeling, large-language-model, vector-database | 1,718,745,546 |
se_78682019 | stackoverflow | ARTIFICIAL_INTELLIGENCE | My LLM application in Streamlit (using python) takes longer time to generate the response | My LLM application in Streamlit (using python) takes longer time to generate the response
I am creating a LLM application using Ollama, Langchain, RAG and streamlit. I am using Mistral as my LLM model from Ollama. However, after uploading the PDF file in the streamlit, it take so much time to generate the answer.
impo... | https://stackoverflow.com/questions/78682019/my-llm-application-in-streamlit-using-python-takes-longer-time-to-generate-the | python-3.x, streamlit, langchain, large-language-model, mistral-7b | 1,719,571,730 |
se_78676598 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Loading int8 version of llama3 from llama.cpp | Loading int8 version of llama3 from llama.cpp
I'm trying to load an 8 bit quantized version of llama3 on my local laptop (linux) from llama.cpp, but the process is getting killed due to memory exceeding.
Is there any way around this?
I've already worked with the 4 bit version, and that runs smoothly | https://stackoverflow.com/questions/78676598/loading-int8-version-of-llama3-from-llama-cpp | linux, out-of-memory, large-language-model, llamacpp, llama3 | 1,719,478,994 |
se_78671931 | stackoverflow | ARTIFICIAL_INTELLIGENCE | LLM Azure Openai - Unable to connect to PostgreSQL DB | LLM Azure Openai - Unable to connect to PostgreSQL DB
I am using LLM in Azure OpenAI and trying to connect to my local instance of PostgreSQL.
Getting error.
The code and error are paste here.
Help is much appreciated.
#!pip install langchain psycopg2
#!pip install --upgrade langchain-experimental
from langchain.llms... | https://stackoverflow.com/questions/78671931/llm-azure-openai-unable-to-connect-to-postgresql-db | postgresql, azure, openai-api, large-language-model | 1,719,398,949 |
se_78244309 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do I embed json documents using embedding models like sentence-transformer or open ai's embedding model? | How do I embed json documents using embedding models like sentence-transformer or open ai's embedding model?
I have a domain specific JSON object for which I want to store in a vector db. I would be using embedding models like sentence=transformer or openai's text-embedding-002.
Questions are:
a) Can these models ... | https://stackoverflow.com/questions/78244309/how-do-i-embed-json-documents-using-embedding-models-like-sentence-transformer-o | openai-api, large-language-model, sentence-transformers, openaiembeddings | 1,711,722,692 |
se_78668957 | stackoverflow | ARTIFICIAL_INTELLIGENCE | ImportError: cannot import name 'Ollama' from 'llama_index.llms' (unknown location) - installing dependencies does not solve the problem | ImportError: cannot import name 'Ollama' from 'llama_index.llms' (unknown location) - installing dependencies does not solve the problem
I want to learn LLMs. I run Ollama with the following Docker Compose file - it's running:
services:
ollama:
image: ollama/ollama:latest
ports:
- 11434... | https://stackoverflow.com/questions/78668957/importerror-cannot-import-name-ollama-from-llama-index-llms-unknown-locati | python, large-language-model, llama-index, ollama | 1,719,339,114 |
se_78190601 | stackoverflow | ARTIFICIAL_INTELLIGENCE | AttributeError: 'Document' object has no attribute 'get_doc_id' | AttributeError: 'Document' object has no attribute 'get_doc_id'
My Application : load CSV file into knowledge graph(using KnowledgeGraphIndex )and use LLM(HuggingFaceH4/zephyr-7b-beta) to retrieve answers from graph store(SimpleGraphStore).
My Problem : I want to pass multiple CSV files into knowledge ... | https://stackoverflow.com/questions/78190601/attributeerror-document-object-has-no-attribute-get-doc-id | python, csv, large-language-model, knowledge-graph, graph-store-protocol | 1,710,902,198 |
se_78645085 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to use Llama3? | How to use Llama3?
I'm using Ollama and llama 3 to build a ChatBot. However, right now, it can't remember chat history. For example, if my first query is "tell me about the theory of relativity," and if my next query is "can you simplify it," it throws a message saying it can't recall earlier conversations.
Here is my... | https://stackoverflow.com/questions/78645085/how-to-use-llama3 | nlp, large-language-model, llama, ollama | 1,718,843,742 |
se_78665255 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why do I get two diffrent responses when using the Inference API feature on thee widget on hugging face compared to one when I run the api locally? | Why do I get two diffrent responses when using the Inference API feature on thee widget on hugging face compared to one when I run the api locally?
I recently discovered hugging face and have been trying to work with it. When using text-to-text model, I came into the issue. no matter which model, i would get a differe... | https://stackoverflow.com/questions/78665255/why-do-i-get-two-diffrent-responses-when-using-the-inference-api-feature-on-thee | python, nlp, huggingface-transformers, large-language-model, huggingface | 1,719,285,486 |
se_78664372 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Pretrained Model Weights Not Updating During DPO Training | Pretrained Model Weights Not Updating During DPO Training
I'm trying to apply DPO to a pre-trained model. However, during the training process, the scores given by the pre-trained model and the fine-tuned model are identical, and the loss remains the same across all batches, leading me to believe the weights are not b... | https://stackoverflow.com/questions/78664372/pretrained-model-weights-not-updating-during-dpo-training | machine-learning, large-language-model, fine-tuning | 1,719,258,528 |
se_78662646 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to avoid CUDA Our of Memory Error when deploying Rhea-72b-v0.5 or other big LLMS on Azure AI Studio | How to avoid CUDA Our of Memory Error when deploying Rhea-72b-v0.5 or other big LLMS on Azure AI Studio
I am using Azure AI Studio and would like to deploy this model davidkim205-rhea-72b-v0.5.
On Azure AI Studio, when I try to deploy this model, I can only select only one VM called Standard_NC96ads_A100_v4 with 96 co... | https://stackoverflow.com/questions/78662646/how-to-avoid-cuda-our-of-memory-error-when-deploying-rhea-72b-v0-5-or-other-big | azure, deployment, large-language-model, azure-ai | 1,719,234,192 |
se_78636972 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to recreate the "view" features of common voice v11 in HuggingFace? | How to recreate the "view" features of common voice v11 in HuggingFace?
The Common Voice v11 on HuggingFace has some amazing View features! They include a dropdown button to select the language, and columns with the dataset features, such as client_id, audio, sentence, etc.
I am building an audio dataset fo... | https://stackoverflow.com/questions/78636972/how-to-recreate-the-view-features-of-common-voice-v11-in-huggingface | large-language-model, huggingface, huggingface-datasets, openai-whisper, huggingface-hub | 1,718,708,087 |
se_78658003 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Inference with LLava v1.6 Mistral model on Amazon SageMaker | Inference with LLava v1.6 Mistral model on Amazon SageMaker
I've deployed the following model llava-hf/llava-v1.6-mistral-7b-hf in Amazon SageMaker simply pasting deployment code from model card (https://huggingface.co/llava-hf/llava-v1.6-mistral-7b-hf). Deployment seems to have gone well, and in the same notebook in... | https://stackoverflow.com/questions/78658003/inference-with-llava-v1-6-mistral-model-on-amazon-sagemaker | python, amazon-sagemaker, large-language-model, inference, mistral-7b | 1,719,127,161 |
se_77820879 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Gemini Pro API's response omits the "text" field when I ask to translate a document | Gemini Pro API's response omits the "text" field when I ask to translate a document
I integrate Gemini Pro into one of our internal tools to allow users to "ask" the documents in our database.
It all worked fine until I was conducting some tests today and noticed that the response objects simply omits th... | https://stackoverflow.com/questions/77820879/gemini-pro-apis-response-omits-the-text-field-when-i-ask-to-translate-a-docum | large-language-model, google-gemini | 1,705,333,729 |
se_78468421 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Error installing Meta-Llama-3-70B model from Hugging Face Hub | Error installing Meta-Llama-3-70B model from Hugging Face Hub
I'm trying to load the Meta-Llama-3-70B model from the Hugging Face Hub using the Transformers library in Python, but I'm encountering the following error:
OSError: We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the c... | https://stackoverflow.com/questions/78468421/error-installing-meta-llama-3-70b-model-from-hugging-face-hub | large-language-model, huggingface, http-error, llama | 1,715,528,182 |
se_78633033 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Long response time with llama-server (40–60sec) | Long response time with llama-server (40–60sec)
I managed to run the Llama server with the following command:
./llama-server -m models/7B/ggml-model.gguf -c 2048
My request looks like this:
time curl --request POST --url http://localhost:8080/completion --header "Content-Type: application/json" --data '{"prompt": "Ca... | https://stackoverflow.com/questions/78633033/long-response-time-with-llama-server-40-60sec | large-language-model, llama, llamacpp, llama3 | 1,718,632,609 |
se_78640090 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to handle the loss function decrease at some points but bounce back to keep increasing when fine-tune LLaMA? | How to handle the loss function decrease at some points but bounce back to keep increasing when fine-tune LLaMA?
Preface
I am new to fine-tuning an LLM model on binary classification tasks. I have tried fine-tuning LLaMA 2 and 3 with the causal inference task (next token prediction) with PEFT LoRA and 4-bit quantizati... | https://stackoverflow.com/questions/78640090/how-to-handle-the-loss-function-decrease-at-some-points-but-bounce-back-to-keep | python, pytorch, nlp, huggingface-transformers, large-language-model | 1,718,757,197 |
se_78521178 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Issues with LLM Retrieving Passwords from Provided Passages | Issues with LLM Retrieving Passwords from Provided Passages
I'm using a language model (LLM) and providing it with a passage that contains the password for a specific website. Later, I'm asking the LLM to retrieve the password from the passage, similar to a Retrieval-Augmented Generation (RAG) approach. However, the L... | https://stackoverflow.com/questions/78521178/issues-with-llm-retrieving-passwords-from-provided-passages | large-language-model, retrieval-augmented-generation, chat-gpt-4, password-retrieval | 1,716,443,692 |
se_78648116 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Ruby langchainrb gem and custom configuration for the model setup | Ruby langchainrb gem and custom configuration for the model setup
I am working in a prototype using the gem langchainrb. I am using the module assistant module to implemente a basic RAG architecture.
Everything works, and now I would like to customize the model configuration.
In the documenation there is no clear way ... | https://stackoverflow.com/questions/78648116/ruby-langchainrb-gem-and-custom-configuration-for-the-model-setup | ruby, large-language-model | 1,718,893,947 |
se_78476679 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to delete a datapoint from vector search index in GCP? | How to delete a datapoint from vector search index in GCP?
How to delete a datapoint from vector search index in GCP?
I read that it can be done using the update_embedding method
image
But couldn't figure out how to do it. Can someone help me with the same?
I tried updating the index by providing a json file that had ... | https://stackoverflow.com/questions/78476679/how-to-delete-a-datapoint-from-vector-search-index-in-gcp | google-cloud-platform, large-language-model | 1,715,674,530 |
se_78639577 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Understanding the results of Transformers Learn In Context with Gradient Descent | Understanding the results of Transformers Learn In Context with Gradient Descent
I'm trying to implement this paper:
https://arxiv.org/pdf/2212.07677
(Here's their code):
https://github.com/google-research/self-organising-systems/tree/master/transformers_learn_icl_by_gd
I'm struggling to match their experimental resul... | https://stackoverflow.com/questions/78639577/understanding-the-results-of-transformers-learn-in-context-with-gradient-descent | machine-learning, nlp, large-language-model, transformer-model, meta-learning | 1,718,743,425 |
se_78379336 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Implementing Router Chains in Langchain Agents | Implementing Router Chains in Langchain Agents
I recently came across this comprehensive guide on using chains in Langchain, and I'm considering incorporating router chains into my Langchain agents to efficiently route inputs to different subchains and obtain responses.
I'd like to know if the router chains within a m... | https://stackoverflow.com/questions/78379336/implementing-router-chains-in-langchain-agents | langchain, agent, large-language-model, langchain-agents | 1,713,970,026 |
se_78633047 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Mistral7B Instruct input size limited | Mistral7B Instruct input size limited
recently i finetuned a Mistral 7B Instruct v0.3 model and deployed it on an AWS Sagemaker endpoint. But got errors like this:
" Received client error (422) from primary with message "{"error":"Input validation error: inputs tokens + max_new_tokens must be <= 4096. Given: 877 input... | https://stackoverflow.com/questions/78633047/mistral7b-instruct-input-size-limited | token, large-language-model, mistral-7b | 1,718,632,802 |
se_77485888 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do I import and configure an LLM so that auto device_map='auto' is supported or circumvented? | How do I import and configure an LLM so that auto device_map='auto' is supported or circumvented?
I'm trying to import and LLM to train over medical data, but I keep recieiving the following error:
ValueError: BertLMHeadModel does not support device_map='auto'. To implement support, the model class needs to i... | https://stackoverflow.com/questions/77485888/how-do-i-import-and-configure-an-llm-so-that-auto-device-map-auto-is-supported | python, large-language-model | 1,700,033,231 |
se_78150042 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Deploying LLM on Sagemaker Endpoint - CUDA out of Memory | Deploying LLM on Sagemaker Endpoint - CUDA out of Memory
I am trying to deploy huggingface LLM (for inference) to Sagemaker Endpoint using custom scripts (Using Pytorch framework with model and inference script zipped as .tar.gz file). The tar.gz file structure is:
model.tar.gz/
|- pytorch_model.bin
|- ....
|- code/
... | https://stackoverflow.com/questions/78150042/deploying-llm-on-sagemaker-endpoint-cuda-out-of-memory | gpu, amazon-sagemaker, endpoint, large-language-model, llama | 1,710,277,517 |
se_78636100 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Finetuning LLama3 on hardware specification data | Finetuning LLama3 on hardware specification data
i want to train llama3-8B model on intel Xeon series CPUs specifications(cores, Gflops, cache, frequency, etc.)
I have prepared basic dataset for it, but it is not giving fruitful results. please suggest me how can I introduce such complex data to the model without RAG.... | https://stackoverflow.com/questions/78636100/finetuning-llama3-on-hardware-specification-data | large-language-model, llama, fine-tuning | 1,718,696,572 |
se_78633812 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Understanding the instructor Package for Structuring LLM Outputs | Understanding the instructor Package for Structuring LLM Outputs
I am trying to structure outputs from a Large Language Model (LLM) and came across the instructor package, which is a true gem. However, I don't fully understand how instructor works "under the hood." Here are two simple examples that achieve the same r... | https://stackoverflow.com/questions/78633812/understanding-the-instructor-package-for-structuring-llm-outputs | python, openai-api, pydantic, langchain, large-language-model | 1,718,643,164 |
se_78624675 | stackoverflow | ARTIFICIAL_INTELLIGENCE | TGI does not reference model weights | TGI does not reference model weights
My server's proxy does not allow me to go to Hugging Face. So, I downloaded Mistral 7B weights from GitHub to another computer, sftpd it over to the server, and untarred the contents,
$ tar -tvf mistral-7B-Instruct-v0.3.tar
-rw-rw---- nobody/nogroup 14496078512 2024-05-09 10:47 con... | https://stackoverflow.com/questions/78624675/tgi-does-not-reference-model-weights | large-language-model, huggingface, mistral-7b | 1,718,393,239 |
se_78390001 | stackoverflow | ARTIFICIAL_INTELLIGENCE | ORPOTrainer Error: Calculated loss must be on the original device: cuda:0 but device in use is cuda:3 | ORPOTrainer Error: Calculated loss must be on the original device: cuda:0 but device in use is cuda:3
I am trying to train Phi3 with an ORPO dataset using the ORPOTrainer from the HuggingFace Transformers library. My machine has 4 GPUs, so I would like to start multi-GPU training.
This is my ORPOCONFIG:
orpo_args = OR... | https://stackoverflow.com/questions/78390001/orpotrainer-error-calculated-loss-must-be-on-the-original-device-cuda0-but-de | python, huggingface-transformers, large-language-model, huggingface, huggingface-trainer | 1,714,129,576 |
se_78632190 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do you handle different types of responses in your chatbot with Spring AI? | How do you handle different types of responses in your chatbot with Spring AI?
How can we design a Spring AI chatbot to handle different types of responses in the same endpoint, without resorting to multiple if-else statements in the controller? What strategies, design patterns, or Spring features can we leverage to a... | https://stackoverflow.com/questions/78632190/how-do-you-handle-different-types-of-responses-in-your-chatbot-with-spring-ai | java, spring, chatbot, large-language-model, spring-ai | 1,718,621,419 |
se_78599128 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Search for documents with similar texts | Search for documents with similar texts
I have a document with three attributes: tags, location, and text.
Currently, I am indexing all of them using LangChain/pgvector/embeddings.
I have satisfactory results, but I want to know if there is a better way since I want to find one or more documents with a specific tag an... | https://stackoverflow.com/questions/78599128/search-for-documents-with-similar-texts | machine-learning, search, langchain, large-language-model, vector-database | 1,717,951,232 |
se_78629100 | stackoverflow | ARTIFICIAL_INTELLIGENCE | langchain DirectoryLoader stuck when reading .md files | langchain DirectoryLoader stuck when reading .md files
Trying to create embeddings from .md files but DirectoryLoader is stuck. This works for pdf files but not for .md.
I am using the below code to create a vector db in chroma, this works perfectly when using the commented loader to read pdfs but when using the curre... | https://stackoverflow.com/questions/78629100/langchain-directoryloader-stuck-when-reading-md-files | openai-api, langchain, large-language-model, retrieval-augmented-generation | 1,718,540,242 |
se_77930568 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Langchain(HuggingFaceModel) - argument needs to be of type (SquadExample, dict) | Langchain(HuggingFaceModel) - argument needs to be of type (SquadExample, dict)
I am trying to build an RAG Question Answering Model using Langchain and HuggingFacePipeline.
model_name = "Intel/dynamic_tinybert"
tokenizer = AutoTokenizer.from_pretrained(model_name, cache_dir="../assets")
question_answerer = pipeline... | https://stackoverflow.com/questions/77930568/langchainhuggingfacemodel-argument-needs-to-be-of-type-squadexample-dict | langchain, large-language-model | 1,706,923,048 |
se_77402963 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Langchain csv_agent with ConversationChain | Langchain csv_agent with ConversationChain
i am working on a chatbot that needs to analyze CSV files. Normally, I use Langchain and create a csv_agent like this
agent= create_csv_agent(
ChatOpenAI(temperature=0, model='gpt-4'),
'csv_pat.csv',
verbose=True,
)
agent.run("chat sentence about csv, e.g wh... | https://stackoverflow.com/questions/77402963/langchain-csv-agent-with-conversationchain | chatbot, prompt, langchain, large-language-model | 1,698,844,943 |
se_78630084 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Can I remove all special tokens from text if I want to use it for LLM continuous pretraining | Can I remove all special tokens from text if I want to use it for LLM continuous pretraining
I want to use text data for for LLM continuous pretraining. I have a bunch of instruction tuning datasets for that purpose. Some of them have text with special tokens like:
[ { "from": "human", "value": "some question" }, { "f... | https://stackoverflow.com/questions/78630084/can-i-remove-all-special-tokens-from-text-if-i-want-to-use-it-for-llm-continuous | dataset, token, large-language-model, pre-trained-model | 1,718,566,421 |
se_78629908 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Can I use the langchain agents with the models provided in AWS Bedrock | Can I use the langchain agents with the models provided in AWS Bedrock
Below is the code which involves the use the langchain agents with the Titan model provided by the AWS Bedrock.
But I am facing issue in this, normal RAG chain is working fine , but when I use the agents with the tools and Titan model as the LLM fo... | https://stackoverflow.com/questions/78629908/can-i-use-the-langchain-agents-with-the-models-provided-in-aws-bedrock | amazon-web-services, langchain, large-language-model, groq, amazon-bedrock | 1,718,562,428 |
se_78542221 | stackoverflow | ARTIFICIAL_INTELLIGENCE | lora finetuning : training loss decrease sharply between two epochs, decrease slowly during one epoch | lora finetuning : training loss decrease sharply between two epochs, decrease slowly during one epoch
As in the pictures, validation loss decreases normaly, training loss during one epoch is also decrease, but slowly. Why training loss decreases sharply between 2 epochs? How should I change parameters to map this gap?... | https://stackoverflow.com/questions/78542221/lora-finetuning-training-loss-decrease-sharply-between-two-epochs-decrease-sl | large-language-model, fine-tuning | 1,716,877,015 |
se_78623315 | stackoverflow | ARTIFICIAL_INTELLIGENCE | KeyError: 'temperature' in DSPy ChainOfThought() | KeyError: 'temperature' in DSPy ChainOfThought()
I created a custom LM Client class like this
from dsp import LM
import json
class CustomLMClient(LM):
def __init__(self, model, **kwargs):
self.model = model
self.provider = "default"
self.history = []
self.llm = ChatOpenAI(m... | https://stackoverflow.com/questions/78623315/keyerror-temperature-in-dspy-chainofthought | openai-api, large-language-model, keyerror, dspy | 1,718,372,443 |
se_78607102 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to Load a Quantized Fine-tuned LLaMA 3-8B Model in vLLM for Faster Inference? | How to Load a Quantized Fine-tuned LLaMA 3-8B Model in vLLM for Faster Inference?
I am working on deploying a quantized fine-tuned LLaMA 3-8B model and I aim to use vLLM to achieve faster inference. I am currently using the following Python code to load the model:
import torch
import transformers
from transformers im... | https://stackoverflow.com/questions/78607102/how-to-load-a-quantized-fine-tuned-llama-3-8b-model-in-vllm-for-faster-inference | python, deployment, large-language-model, llama, vllm | 1,718,104,231 |
se_78587797 | stackoverflow | ARTIFICIAL_INTELLIGENCE | load_summarize_chain with Llama3 returns nonsense in intermediate steps | load_summarize_chain with Llama3 returns nonsense in intermediate steps
I've been using a 4bit Q_K_M M 8B sized version of llama3 for some summarization tasks. I've been trying it out on open source data - Salesforce/dialogstudio for now, and what should be a simple map_reduce summarization job is returning complete n... | https://stackoverflow.com/questions/78587797/load-summarize-chain-with-llama3-returns-nonsense-in-intermediate-steps | langchain, large-language-model, llama | 1,717,689,343 |
se_77198227 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Semantic-search in large documents | Semantic-search in large documents
I am working on a project where I need to develop a program that identifies sentences from a predefined list, within a large document. The goal is to find the closest matches based on semantic meaning, as the sentences may not be exactly identical. For instance, "What is your name" s... | https://stackoverflow.com/questions/77198227/semantic-search-in-large-documents | python-3.x, performance, huggingface-transformers, large-language-model, sentence-transformers | 1,695,934,525 |
se_77905570 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Langchain OpenAI invoke - unexpected keyword argument "functions" | Langchain OpenAI invoke - unexpected keyword argument "functions"
from langchain.schema import HumanMessage, SystemMessage, AIMessage
from langchain_openai import OpenAI
from langchain.chains.openai_functions.tagging import create_tagging_chain
from langchain.prompts import ChatPromptTemplate
... | https://stackoverflow.com/questions/77905570/langchain-openai-invoke-unexpected-keyword-argument-functions | openai-api, langchain, large-language-model | 1,706,610,069 |
se_78617892 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to integrate outlines with LlamaIndex | How to integrate outlines with LlamaIndex
I am working on creating an LLM for my company and then I am using Llama model for testing right now . Until Now, I have been using Deepeval library for evaluating my LLM. But, Sometimes the json output generated has some elements that cannot be converted into a json while try... | https://stackoverflow.com/questions/78617892/how-to-integrate-outlines-with-llamaindex | json, large-language-model | 1,718,282,061 |
se_78617838 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Langchain SQL Agents using Knowledge Graphs | Langchain SQL Agents using Knowledge Graphs
I'm designing custom SQL agents using LangGraph to have more control over the agent flow. I need to define a sequence of tool executions in a knowledge graph and ensure the system executes them correctly. This is my current understanding of how the flow should work:
Start w... | https://stackoverflow.com/questions/78617838/langchain-sql-agents-using-knowledge-graphs | langchain, large-language-model, sql-agent, knowledge-graph, langgraph | 1,718,281,494 |
se_78615577 | stackoverflow | ARTIFICIAL_INTELLIGENCE | langchain: how to prevent the language model response from being prefixed with AI: or Assistant: | langchain: how to prevent the language model response from being prefixed with AI: or Assistant:
I have the following langchain prompt setup for a RAG based chat application:
## Prompt Chain Setup ##
retrieval_qa_chat_prompt = hub.pull("langchain-ai/retrieval-qa-chat")
retriever = chroma_db.as_retriever()
contextuali... | https://stackoverflow.com/questions/78615577/langchain-how-to-prevent-the-language-model-response-from-being-prefixed-with-a | python, langchain, large-language-model | 1,718,245,127 |
se_77684757 | stackoverflow | ARTIFICIAL_INTELLIGENCE | LLM model is not loading into the GPU even after BLAS = 1, LlamaCpp, Langchain, Mistral 7b GGUF Model | LLM model is not loading into the GPU even after BLAS = 1, LlamaCpp, Langchain, Mistral 7b GGUF Model
Confession:
At first, I am not an expert at all in this sector; I am just practicing and trying to learn while working. Also, I am confused about whether this kind of model does not run on this type of GPU or not.
I a... | https://stackoverflow.com/questions/77684757/llm-model-is-not-loading-into-the-gpu-even-after-blas-1-llamacpp-langchain | python-3.x, langchain, large-language-model, llama-cpp-python, mistral-7b | 1,702,984,462 |
se_77679499 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Issue with SQLDatabase.from_uri in langchain when including views | Issue with SQLDatabase.from_uri in langchain when including views
I am currently working with the SQLDatabase.from_uri method in langchain to include tables and views in my database. While I have successfully included tables and they are working as expected, I am encountering difficulties when attempting to add views ... | https://stackoverflow.com/questions/77679499/issue-with-sqldatabase-from-uri-in-langchain-when-including-views | langchain, large-language-model | 1,702,907,191 |
se_78493699 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Unable for sending multiple input using Llama CPP and Llama-index | Unable for sending multiple input using Llama CPP and Llama-index
I am using Mistral 77b-instruct model with llama-index and load the model using llamacpp, and when I am trying to run multiple inputs or prompts ( open 2 website and send 2 prompts) , and it give me this errors:
**GGML_ASSERT: D:\a\llama-cpp-python\lla... | https://stackoverflow.com/questions/78493699/unable-for-sending-multiple-input-using-llama-cpp-and-llama-index | python, large-language-model, llama-index, llama-cpp-python, llamacpp | 1,715,925,054 |
se_77573344 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Dynamic routing of retrievers in LangChain | Dynamic routing of retrievers in LangChain
In my use case a user selects a product and then enters a query. I need to run retrieval and generation to create a response. There are 3 different products, and for each one there is a different Elastic index.
A naive implementation would be to create 3 chains:
product A -> ... | https://stackoverflow.com/questions/77573344/dynamic-routing-of-retrievers-in-langchain | information-retrieval, langchain, large-language-model | 1,701,278,967 |
se_78585726 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to load web articles into RAG LLM for embedding | How to load web articles into RAG LLM for embedding
I watched this tutorial (https://youtu.be/2TJxpyO3ei4) on setting up RAG (retrieval augmented generation) using LLMs (I used a local embedding model and a local model for queries). I want to be able to have a data folder where I can read the documents from HTML files... | https://stackoverflow.com/questions/78585726/how-to-load-web-articles-into-rag-llm-for-embedding | langchain, large-language-model, ollama, retrieval-augmented-generation | 1,717,666,585 |
se_78420498 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Embedding of LLM vs custom embeddings | Embedding of LLM vs custom embeddings
I am new to topic of LLMs (been just 2-3 days) and I've encountered a potential issue in RAG Pipelines. Which assertion is wrong/right?
LLM models utilize the most fundamental units of processing as tokens. Tokens are created via tokenizers (will be specific to a model)
A token ... | https://stackoverflow.com/questions/78420498/embedding-of-llm-vs-custom-embeddings | huggingface-transformers, embedding, large-language-model, huggingface-tokenizers, retrieval-augmented-generation | 1,714,667,043 |
se_78433567 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why is RetrieveAndGenerate API response is giving empty list for retrievedReferences even when output is being generated and mapped to source docs? | Why is RetrieveAndGenerate API response is giving empty list for retrievedReferences even when output is being generated and mapped to source docs?
Using retrieve_and_generate API to query knowledge base on AWS Bedrock.
The response body consist of output answer along with the source mapping but the cited retrievedRef... | https://stackoverflow.com/questions/78433567/why-is-retrieveandgenerate-api-response-is-giving-empty-list-for-retrievedrefere | amazon-web-services, large-language-model | 1,714,938,817 |
se_78247417 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to navigate to previous chats using Langchain much like ChatGPT does? | How to navigate to previous chats using Langchain much like ChatGPT does?
I am building a RAG-based ChatPDF application. The user can enter the PDF to generate the embeddings for, the embeddings are stored in a vector database (I am using Chromadb). Now all the basic chat functionality is working all fine along with t... | https://stackoverflow.com/questions/78247417/how-to-navigate-to-previous-chats-using-langchain-much-like-chatgpt-does | python, mongodb, langchain, large-language-model, chromadb | 1,711,791,008 |
se_78600925 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to detect multiple tasks in a single command using LLM or any NLP model? | How to detect multiple tasks in a single command using LLM or any NLP model?
I am building a bot that takes inputs from users and performs action. Now I want it to differentiate between commands that contain single task and multiple tasks.
How can I make this a reality? Should I utilize prompting but there are infinit... | https://stackoverflow.com/questions/78600925/how-to-detect-multiple-tasks-in-a-single-command-using-llm-or-any-nlp-model | artificial-intelligence, openai-api, prompt, large-language-model | 1,718,003,488 |
se_78597560 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Training or finetuning RETRO model with my own dataset using lucidrains RETRO-pytorch | Training or finetuning RETRO model with my own dataset using lucidrains RETRO-pytorch
While running the Trainingwrapper script of lucidrain/RETRO-pytorch in Google colab, I get the exception: No embeddings found in folder .tmp/embeddings. The log says there's a file saved in that location and I have checked for a file... | https://stackoverflow.com/questions/78597560/training-or-finetuning-retro-model-with-my-own-dataset-using-lucidrains-retro-py | deep-learning, large-language-model, retrieval-augmented-generation | 1,717,906,721 |
se_78594661 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Gemini Advanced can but API cannot read links? | Gemini Advanced can but API cannot read links?
I was giving a prompt containing a link to https://gemini.google.com/ and it successfully gave me the result. (Worked with both Gemini and Gemini Advanced).
But when I do the same via https://aistudio.google.com/app/prompts/new_chat, I get I am sorry, I do not have acces... | https://stackoverflow.com/questions/78594661/gemini-advanced-can-but-api-cannot-read-links | large-language-model, google-gemini, google-generativeai | 1,717,818,058 |
se_78383580 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Parse tables in PDF file (when RAG) | Parse tables in PDF file (when RAG)
I'm working on an application like chatPDF by using LLM with RAG.
I face a problem that I can't find a python library to parse one pdf file which includes some "complex" tables.
e.g.
I have tried llamaIndex(SimpleDirectoryReader), and "unstructured" library, only obtaining the text... | https://stackoverflow.com/questions/78383580/parse-tables-in-pdf-file-when-rag | langchain, large-language-model, information-retrieval, llama-index, retrieval-augmented-generation | 1,714,036,959 |
se_77737212 | stackoverflow | ARTIFICIAL_INTELLIGENCE | download gpt4all-falcon-q4_0.gguf | download gpt4all-falcon-q4_0.gguf
I downloaded the gpt4all-falcon-q4_0.gguf locally on my device to make a local app on VScode.
from gpt4all import GPT4All
model = GPT4All(r"C:\Users\Issa\Desktop\GRADproject\Lib\site-packages\Gpt4all_Modules\gpt4all-falcon-q4_0.gguf")
I'm encountering this error:
Value Error: Invalid... | https://stackoverflow.com/questions/77737212/download-gpt4all-falcon-q4-0-gguf | vscode-extensions, large-language-model, falcon, gpt4all | 1,703,965,714 |
se_78591465 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Unexpected string validation error in Langchain Pydantic output parser | Unexpected string validation error in Langchain Pydantic output parser
I do not understand why the below use of the PydanticOutputParser is erroring.
The docs do not seem correct - If I follow this exactly (i.e. use with_structured_output exclusively, without an output parser) then the output is a dict, not Pydantic c... | https://stackoverflow.com/questions/78591465/unexpected-string-validation-error-in-langchain-pydantic-output-parser | python, pydantic, langchain, large-language-model | 1,717,757,629 |
se_77434618 | stackoverflow | ARTIFICIAL_INTELLIGENCE | QA with a large csv using langchain | QA with a large csv using langchain
I was working on QA using a large csv dataset (140K rows,18 columns).
I am using a local llm model (llama2) along with create_csv_agent.
First of all the agent is only displaying 5 rows instead of 10.
Secondly when I asked about "count the total number of rows in the dataset". It al... | https://stackoverflow.com/questions/77434618/qa-with-a-large-csv-using-langchain | langchain, large-language-model, py-langchain, llama | 1,699,310,635 |
se_78589843 | stackoverflow | ARTIFICIAL_INTELLIGENCE | I get an error that says "Object of type Message is not JSON serializable" when I run this code | I get an error that says "Object of type Message is not JSON serializable" when I run this code
Whenever I run this code, I get an error that says "Object of type Message is not JSON serializable". The code is supposed to create a chatbot to the local host. There is an API key involved and this code is based... | https://stackoverflow.com/questions/78589843/i-get-an-error-that-says-object-of-type-message-is-not-json-serializable-when | python, large-language-model | 1,717,731,256 |
se_78582614 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can I increase the number of concurrent requests Amazon SageMaker will take? | How can I increase the number of concurrent requests Amazon SageMaker will take?
Bear with me here since I'm new to AWS. I'm trying to process this big database of documents, in particular I am using Mistral-7b-v0.3 to create summaries. I am deploying the model with this machine, using Real Time Inference:
instance_ty... | https://stackoverflow.com/questions/78582614/how-can-i-increase-the-number-of-concurrent-requests-amazon-sagemaker-will-take | python, amazon-web-services, amazon-sagemaker, large-language-model | 1,717,608,224 |
se_78328539 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Huggingface pipeline available models | Huggingface pipeline available models
I'm working with Huggingface in Python to make inference with specific LLM text generation models. So far I used pipelines like this to initialize the model, and then insert input from a user and retrieve the response:
import torch
from transformers import pipeline
print(torch.cud... | https://stackoverflow.com/questions/78328539/huggingface-pipeline-available-models | python, python-3.x, machine-learning, pytorch, large-language-model | 1,713,185,683 |
se_77210263 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to send data in batches to a LLM | How to send data in batches to a LLM
I have a question on batch processing with LLMs and wanted to see if anyone can help with this.
Is there a way to send data in batches to a LLM to be processed by a GPU? Say for eg. if I wanted to get daily sentiment ratings, rather than sending daily posts to a LLM, is there a way... | https://stackoverflow.com/questions/77210263/how-to-send-data-in-batches-to-a-llm | batch-processing, openai-api, large-language-model, llama, gpt-4 | 1,696,159,350 |
se_78560448 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Chainlit Stream responses from Groq & Langchain | Chainlit Stream responses from Groq & Langchain
my Chainlit AI chat application uses Groq, OpenAI embeddings, LangChain and Chromadb, and it allows the user to upload a PDF and interact with it. It works fine, but it spits out the whole response.
I'd like it to stream the responses instead. How can I achieve this?... | https://stackoverflow.com/questions/78560448/chainlit-stream-responses-from-groq-langchain | python, chatbot, langchain, large-language-model, chromadb | 1,717,163,403 |
se_78570279 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Speeding up load time of LLMs | Speeding up load time of LLMs
I am currently only able to play around with a V100 on GCP. I understand that I can load a LLM in 4bit quantization as shown below. However, (assuming due to the quantization) it is taking up to 10 minutes to load this model.
Is there a way to speed up this loading process?
I see that th... | https://stackoverflow.com/questions/78570279/speeding-up-load-time-of-llms | huggingface-transformers, large-language-model, quantization | 1,717,417,811 |
se_78584851 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Not able to access llama3 using python | Not able to access llama3 using python
I am testing llama3 here using this simple code below
import ollama
message = "What is football"
# connect to Llama3 model
try:
response_stream = ollama.chat(
model="llama3",
messages=[{ 'role': 'assistant','content': message}],
stream= True
)
print("... | https://stackoverflow.com/questions/78584851/not-able-to-access-llama3-using-python | python, large-language-model, ollama, llama3 | 1,717,656,172 |
se_78580757 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Mistral model adds some comments from itself when it is asked just to translate the input | Mistral model adds some comments from itself when it is asked just to translate the input
How to make a prompt so that the model just translates the text without adding any comments from itself?
Here is how we use it:
url = "https://modelslab.com/api/v6/llm/uncensored_chat"
payload = json.dumps({
"key": api_key,
... | https://stackoverflow.com/questions/78580757/mistral-model-adds-some-comments-from-itself-when-it-is-asked-just-to-translate | translation, prompt, large-language-model | 1,717,587,998 |
se_78580476 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Pass a list in a Runnable in Langchain | Pass a list in a Runnable in Langchain
I created a small app using langchain in which I combine RAG with chat history. I'm trying to pass a ChatMessageHistory() into a chain, but I get the following error:
TypeError: Expected a Runnable, callable or dict.Instead got an unsupported type: <class 'list'>
I know the error... | https://stackoverflow.com/questions/78580476/pass-a-list-in-a-runnable-in-langchain | python, langchain, large-language-model | 1,717,584,817 |
se_77565949 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Using langchain and LLaMA2 to QA with a large SQL DB | Using langchain and LLaMA2 to QA with a large SQL DB
I was working with a sqlite DB that I created for a large dataset (~150k rows).
Code snippets:
db = SQLDatabase.from_uri("sqlite:///MLdata.sqlite")
SQLITE_PROMPT_TEXT = '''You are a SQLite expert. Given an input question, first create a
syntactically correct SQLite... | https://stackoverflow.com/questions/77565949/using-langchain-and-llama2-to-qa-with-a-large-sql-db | nlp, langchain, large-language-model, llama | 1,701,192,410 |
se_78552651 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to fix error `OSError: <model> does not appear to have a file named config.json.` when loading custom fine-tuned model? | How to fix error `OSError: <model> does not appear to have a file named config.json.` when loading custom fine-tuned model?
Preface
I am new to implementing the NLP model. I have successfully fine-tuned LLaMA 3-8B variants with QLORA and uploaded them to HuggingFace.
The directories are filled with these files:
... | https://stackoverflow.com/questions/78552651/how-to-fix-error-oserror-model-does-not-appear-to-have-a-file-named-config-j | pytorch, nlp, huggingface-transformers, large-language-model, peft | 1,717,036,616 |
se_78575305 | stackoverflow | ARTIFICIAL_INTELLIGENCE | AttributeError: 'TrainingArguments' object has no attribute 'model_init_kwargs' | AttributeError: 'TrainingArguments' object has no attribute 'model_init_kwargs'
While finetuning Gemma2B model using QLoRA i'm getting error as AttributeError: 'TrainingArguments' object has no attribute 'model_init_kwargs'
Code:
Loading the libraries
from enum import Enum
from functools import partial... | https://stackoverflow.com/questions/78575305/attributeerror-trainingarguments-object-has-no-attribute-model-init-kwargs | python, nlp, huggingface-transformers, large-language-model, peft | 1,717,502,794 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.