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_79344565
stackoverflow
ARTIFICIAL_INTELLIGENCE
Using `bitsandbytes` 4-bit quantization requires the latest version of bitsandbytes: `pip install -U bitsandbytes`
Using `bitsandbytes` 4-bit quantization requires the latest version of bitsandbytes: `pip install -U bitsandbytes` While loading the tokenizer, I received this error: ImportError: Using bitsandbytes 4-bit quantization requires the latest version of bitsandbytes: pip install -U bitsandbytes. I am using Jupyter notebo...
https://stackoverflow.com/questions/79344565/using-bitsandbytes-4-bit-quantization-requires-the-latest-version-of-bitsandby
python, machine-learning, huggingface-transformers, large-language-model, fine-tuning
1,736,481,161
se_79462290
stackoverflow
ARTIFICIAL_INTELLIGENCE
where does ollama get the parameters to run the model with automatic1111
where does ollama get the parameters to run the model with automatic1111 I tried to start image generation via chat in OpenWebUI on AUTOMATIC1111 (Schedule type: Кarras, Sampling method: DPM++ 2M, CFG Scale: 5.5, W:768, H:768, Sampling Steps: 20), and after ~20 seconds I got an image, but the VRAM resource was not rel...
https://stackoverflow.com/questions/79462290/where-does-ollama-get-the-parameters-to-run-the-model-with-automatic1111
large-language-model, ollama, stable-diffusion
1,740,361,778
se_79599581
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to safely cancel a running Hugging Face text generation mid-inference without restarting the whole server?
How to safely cancel a running Hugging Face text generation mid-inference without restarting the whole server? When running large models with Hugging Face's generate() function, if a user decides to cancel a request (e.g., UI "stop" button), the server has no way to interrupt an ongoing generate() call. Currently, it ...
https://stackoverflow.com/questions/79599581/how-to-safely-cancel-a-running-hugging-face-text-generation-mid-inference-withou
python, huggingface-transformers, large-language-model
1,745,989,912
se_79595929
stackoverflow
ARTIFICIAL_INTELLIGENCE
Warm up HuggingFace Transformers models efficiently to reduce first-token latency in production
Warm up HuggingFace Transformers models efficiently to reduce first-token latency in production In production deployment of Hugging Face LLMs, the first inference call often has very high latency ("cold start"), even on a machine where the model is already loaded into memory. Subsequent calls are much faster. I want t...
https://stackoverflow.com/questions/79595929/warm-up-huggingface-transformers-models-efficiently-to-reduce-first-token-latenc
python, huggingface-transformers, large-language-model, latency
1,745,822,984
se_79596520
stackoverflow
ARTIFICIAL_INTELLIGENCE
Where to import the models for DeepSeek VL2 from?
Where to import the models for DeepSeek VL2 from? I am trying to run the DeepSeek VL2 model (tiny version) locally and use the following code found on Huggingface: import torch from transformers import AutoModelForCausalLM from deepseek_vl.models import DeepseekVLV2Processor, DeepseekVLV2ForCausalLM from deepseek_vl....
https://stackoverflow.com/questions/79596520/where-to-import-the-models-for-deepseek-vl2-from
python, huggingface-transformers, large-language-model, deepseek
1,745,844,717
se_79565168
stackoverflow
ARTIFICIAL_INTELLIGENCE
Langchain Agent: No Attribute Error : OpenAPIAgent
Langchain Agent: No Attribute Error : OpenAPIAgent I'm building a OpenAPI Agent using langchain's OpenAPIAgent. When I try to create the agent with below code. It's throwin AttributeError. I am using simple petstore openapi specification to build this agent. Expectation would be based on user query it calls API and re...
https://stackoverflow.com/questions/79565168/langchain-agent-no-attribute-error-openapiagent
python, langchain, large-language-model, ollama, langchain-agents
1,744,225,784
se_79590018
stackoverflow
ARTIFICIAL_INTELLIGENCE
Deploy an opensource LLM in Azure ecosystem and create an api endpoint
Deploy an opensource LLM in Azure ecosystem and create an api endpoint I am looking to deploy an open-source LLM like Gemma3 4b in the Azure ecosystem. I couldn't find this specific model in the model catalog of Azure Machine Learning Studio. I usually run these models using LM Studio or Ollama on my local PC, but I w...
https://stackoverflow.com/questions/79590018/deploy-an-opensource-llm-in-azure-ecosystem-and-create-an-api-endpoint
azure, open-source, large-language-model, azure-machine-learning-service, gemma
1,745,479,195
se_79595144
stackoverflow
ARTIFICIAL_INTELLIGENCE
Can we have to runnable in runnableparallel?
Can we have to runnable in runnableparallel? I found this code on the internet : qa_chain = ( RunnableParallel({ "context": itemgetter("question") | retriever, "question": itemgetter("question") }) | { "response": prompt | llm, "context": itemgett...
https://stackoverflow.com/questions/79595144/can-we-have-to-runnable-in-runnableparallel
langchain, large-language-model
1,745,765,007
se_79583977
stackoverflow
ARTIFICIAL_INTELLIGENCE
No stopping token generated by Llama-3.2-1B-Instruct
No stopping token generated by Llama-3.2-1B-Instruct I am experimenting with Llama-3.2-1B-Instruct for learning purposes. When I try to implement a simple re-write task with Hugging Face transformers, I get a weird result when the model does not generate a stopping token so the response goes on until the max_new_token...
https://stackoverflow.com/questions/79583977/no-stopping-token-generated-by-llama-3-2-1b-instruct
huggingface-transformers, large-language-model, llama
1,745,205,018
se_79591974
stackoverflow
ARTIFICIAL_INTELLIGENCE
Error Running OCR with Qwen2.5-VL in Colab
Error Running OCR with Qwen2.5-VL in Colab I am trying to run the OCR functionality of Qwen2.5-VL by following the tutorial provided in this notebook: OCR Tutorial Notebook However, I am encountering an error when attempting to execute the code. Here are the details: Steps Taken: I opened the notebook in Google Colab...
https://stackoverflow.com/questions/79591974/error-running-ocr-with-qwen2-5-vl-in-colab
python, gpu, ocr, large-language-model
1,745,564,718
se_78747780
stackoverflow
ARTIFICIAL_INTELLIGENCE
Meta Llama-3 prompt sample
Meta Llama-3 prompt sample I am trying to ask Llama-3 model to read a document and then answer my questions, but my code seems does not generate any output. Can someone tell me what’s wrong with the code? I appreciate it. Code: from huggingface_hub import login login(token=‘my_token’) import transformers import torch ...
https://stackoverflow.com/questions/78747780/meta-llama-3-prompt-sample
large-language-model, llama
1,721,007,400
se_77842203
stackoverflow
ARTIFICIAL_INTELLIGENCE
ValidationError: 2 validation errors for LLMChain
ValidationError: 2 validation errors for LLMChain This is my complete code: !pip install -q transformers einops accelerate langchain bitsandbytes sentence_transformers faiss-cpu pypdf sentencepiece from langchain import HuggingFacePipeline from transformers import AutoTokenizer from langchain.embeddings impo...
https://stackoverflow.com/questions/77842203/validationerror-2-validation-errors-for-llmchain
python, machine-learning, deep-learning, langchain, large-language-model
1,705,609,248
se_79129165
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to make a llm remember previous runtime chats
How to make a llm remember previous runtime chats I want my llm chatbot to remember previous conversations even after restarting the program. It is made with llama cpp python and langchain, it has conversation memory of the present chat but obviously doesn't have memory of the previous chat and that's what I need help...
https://stackoverflow.com/questions/79129165/how-to-make-a-llm-remember-previous-runtime-chats
langchain, large-language-model, llama-cpp-python
1,729,965,726
se_79547235
stackoverflow
ARTIFICIAL_INTELLIGENCE
Serving models using VLLM on Huggingface Spaces
Serving models using VLLM on Huggingface Spaces Hi everyone so I'm trying to serve models on huggingface using docker and vllm, but am encountering model config errors and unknown model errors, I'm using the latest version of vllm and have tried mistral 7b v0.2 and v0.3 and Qwen2.5-Coder-32B. My DockerFile looks like ...
https://stackoverflow.com/questions/79547235/serving-models-using-vllm-on-huggingface-spaces
docker, large-language-model, huggingface, vllm
1,743,453,966
se_79587135
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to Match Claude.ai Response Quality Using the Anthropic API?
How to Match Claude.ai Response Quality Using the Anthropic API? How to Match Claude.ai Response Quality Using the Anthropic API? When I use https://claude.ai, the responses are significantly more thoughtful and structured. However, when using the Anthropic API, the output quality is noticeably lower—even though I’m u...
https://stackoverflow.com/questions/79587135/how-to-match-claude-ai-response-quality-using-the-anthropic-api
large-language-model, claude
1,745,343,675
se_78008119
stackoverflow
ARTIFICIAL_INTELLIGENCE
Huggingface transformer train function throwing Device() received an invalid combination of arguments
Huggingface transformer train function throwing Device() received an invalid combination of arguments I was trying to train a model with peft qLora training. Lora config and peft training args are like below: lora_config = LoraConfig( r=8, lora_alpha=16, target_modules=[ "q_proj", "k_proj",...
https://stackoverflow.com/questions/78008119/huggingface-transformer-train-function-throwing-device-received-an-invalid-com
pytorch, huggingface-transformers, large-language-model, llama, peft
1,708,094,395
se_79532526
stackoverflow
ARTIFICIAL_INTELLIGENCE
LangGraph: How to trigger external side effects before entering a specific node?
LangGraph: How to trigger external side effects before entering a specific node? I'm building a chatbot using LangGraph for Node.js, and I'm trying to improve the user experience by showing a typing... indicator before the assistant actually generates a response. The problem is: I only want to trigger this sendTyping(...
https://stackoverflow.com/questions/79532526/langgraph-how-to-trigger-external-side-effects-before-entering-a-specific-node
node.js, langchain, large-language-model, langgraph, langchain-agents
1,742,867,205
se_79581448
stackoverflow
ARTIFICIAL_INTELLIGENCE
passing correct context to the model via the Ollama api
passing correct context to the model via the Ollama api I am teaching myself LLM programming by developing a RAG application. I am running Llama 3.2 on my laptop using Ollama, and using a mix of SQLite and langchain. I can pass a context to the llm along with my question so the model uses the context for generating an...
https://stackoverflow.com/questions/79581448/passing-correct-context-to-the-model-via-the-ollama-api
node.js, langchain, large-language-model, ollama, llama3
1,744,996,046
se_79018435
stackoverflow
ARTIFICIAL_INTELLIGENCE
Langraph - tools_condition - conditional edge
Langraph - tools_condition - conditional edge I am new to langgraph (python) and trying to go through some examples found in Langgraph pages. My code looks like below: class State(TypedDict): summary: str messages: list def summarize_conversation(state: State): # First, we summarize the conversation s...
https://stackoverflow.com/questions/79018435/langraph-tools-condition-conditional-edge
python, chatbot, large-language-model, edges, langgraph
1,727,178,030
se_79576039
stackoverflow
ARTIFICIAL_INTELLIGENCE
Langgraph: How to retrieve and store chat history throughout the session
Langgraph: How to retrieve and store chat history throughout the session I am new to the Langgraph. I am trying to retrieve chathistory from state into a variable untill the session close. below what i have tried llm = ChatOpenAI(temperature=1.0) class State(TypedDict): messages : Annotated[list, add_messages] g...
https://stackoverflow.com/questions/79576039/langgraph-how-to-retrieve-and-store-chat-history-throughout-the-session
python, artificial-intelligence, langchain, large-language-model, langgraph
1,744,751,895
se_79537151
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to incorporate additional data in fine tuning LLM
How to incorporate additional data in fine tuning LLM My goal is to create a chat bot specialized in answering questions related to diabetes. I am new to fine tuning and have a couple questions before I begin. My question is about the dataset format and the underlying model I should use. I want to fine tune the LLM on...
https://stackoverflow.com/questions/79537151/how-to-incorporate-additional-data-in-fine-tuning-llm
large-language-model, llama, fine-tuning
1,743,019,030
se_79576484
stackoverflow
ARTIFICIAL_INTELLIGENCE
Why does Groq return "tool_use_failed" error when using instructor with a valid response model, even though function call output looks correct?
Why does Groq return "tool_use_failed" error when using instructor with a valid response model, even though function call output looks correct? I'm deploying a Python FastAPI app on Render, and I'm using the instructor library to parse LLM responses into a Pydantic model using Groq's API. Locally, everything...
https://stackoverflow.com/questions/79576484/why-does-groq-return-tool-use-failed-error-when-using-instructor-with-a-valid
rest, backend, fastapi, large-language-model, groq
1,744,782,895
se_78737510
stackoverflow
ARTIFICIAL_INTELLIGENCE
Unable to make llama.cpp on M1 Mac
Unable to make llama.cpp on M1 Mac When I try installing Llam.cpp, I get the following error: ld: warning: ignoring file '/Users/krishparikh/Projects/LLM/llama.cpp/ggml/src/ggml-metal-embed.o': found architecture 'x86_64', required architecture 'arm64' Undefined symbols for architecture arm64: "_ggml_metallib_end", ...
https://stackoverflow.com/questions/78737510/unable-to-make-llama-cpp-on-m1-mac
apple-m1, large-language-model, llama, llama-cpp-python, llamacpp
1,720,728,681
se_79524584
stackoverflow
ARTIFICIAL_INTELLIGENCE
Snowflake Cortex Search -- applying custom dimensions like "popularity"
Snowflake Cortex Search -- applying custom dimensions like "popularity" A blog here https://www.snowflake.com/en/engineering-blog/ecommerce-search-intelligent-ranking-made-simple/ mentions integrating 'engagement' scores such as ratings or purchases or article hits or whatever in refining Snowflake's Cortex ...
https://stackoverflow.com/questions/79524584/snowflake-cortex-search-applying-custom-dimensions-like-popularity
search, snowflake-cloud-data-platform, large-language-model
1,742,533,645
se_79428475
stackoverflow
ARTIFICIAL_INTELLIGENCE
AWS Bedrock: cannot invoke Anthropic Claude Sonnet 3.5 v2 model, raises error "Invocation of model ID with on-demand throughput isn’t supported."
AWS Bedrock: cannot invoke Anthropic Claude Sonnet 3.5 v2 model, raises error "Invocation of model ID with on-demand throughput isn’t supported." I am trying to invoke the Anthropic Claude Sonnet 3.5 v2 model in AWS Bedrock. Here is my code (in Python using Boto3): import boto3 import json bedrock_runtime =...
https://stackoverflow.com/questions/79428475/aws-bedrock-cannot-invoke-anthropic-claude-sonnet-3-5-v2-model-raises-error-i
amazon-web-services, large-language-model, amazon-bedrock, claude
1,739,227,067
se_76630950
stackoverflow
ARTIFICIAL_INTELLIGENCE
Fit the chat response into a list in GPT API
Fit the chat response into a list in GPT API I'm trying to get the emotion in a text using chatgpt API def infer_feeling(text): prompt = f"What feeling is filled in the following text?\nText: {text}\nFeeling:" response = openai.ChatCompletion.create( model=model, messages=[ {"role"...
https://stackoverflow.com/questions/76630950/fit-the-chat-response-into-a-list-in-gpt-api
python, openai-api, chatgpt-api, large-language-model
1,688,661,815
se_78298807
stackoverflow
ARTIFICIAL_INTELLIGENCE
Understanding pydantic output parser from an LLM output
Understanding pydantic output parser from an LLM output I have a problem understanding output parsers (especially (pydanticoutputparser) and what are there capabilities. I make a query from my llm to parse some data with this pydantic object : class Diploma(BaseModel): diploma_name: Optional[str] = Field(None, de...
https://stackoverflow.com/questions/78298807/understanding-pydantic-output-parser-from-an-llm-output
parsing, pydantic, langchain, large-language-model
1,712,669,293
se_77940468
stackoverflow
ARTIFICIAL_INTELLIGENCE
Evaluation of answers obtained from RAG architecture with RAGAS without OPENAI keys
Evaluation of answers obtained from RAG architecture with RAGAS without OPENAI keys I have used Llama2 open source models for creating a chatbot for my personal documents using RAG architecture. I wish to evaluate the results obtained from RAG architecture with evaluation metrics , may be from RAGAS module. But it ins...
https://stackoverflow.com/questions/77940468/evaluation-of-answers-obtained-from-rag-architecture-with-ragas-without-openai-k
openai-api, langchain, evaluation, large-language-model, llama
1,707,131,602
se_79551930
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to parse Azure TTS streaming text input response with websocket?
How to parse Azure TTS streaming text input response with websocket? I want to use this feature to build my app, but since I'm coding with JS and there is no streaming text input in JS sdk, so I'm tring to made it on my own, I find some way to get the response from the Azure service, it looks like: X-RequestId:0db8038...
https://stackoverflow.com/questions/79551930/how-to-parse-azure-tts-streaming-text-input-response-with-websocket
azure, text-to-speech, large-language-model
1,743,650,428
se_79563033
stackoverflow
ARTIFICIAL_INTELLIGENCE
Passing image in Google drive to multimodal LLM
Passing image in Google drive to multimodal LLM I'm trying to upload an image from Google drive to an LLM from analysis. I have the working code below: function openRouterApiRequest() { var apiKey = "****"; // var imageUrl = 'https://upload.wikimedia.org/wikipedia/commons/thumb/d/dd/Gfp-wisconsin-madison-the-na...
https://stackoverflow.com/questions/79563033/passing-image-in-google-drive-to-multimodal-llm
javascript, google-apps-script, google-drive-api, large-language-model
1,744,145,255
se_78332474
stackoverflow
ARTIFICIAL_INTELLIGENCE
Is there any method to fully load the GGUF models on GPU
Is there any method to fully load the GGUF models on GPU I have been using LlamaCPP to load my llm models, the llama-index library provides methods to offload some layers onto the GPU. Why does it not provide any methods to fully load the model on GPU. If there is some method Please help. LlamaCPP method Here we have ...
https://stackoverflow.com/questions/78332474/is-there-any-method-to-fully-load-the-gguf-models-on-gpu
python, large-language-model, huggingface, llama-index, llamacpp
1,713,248,163
se_79558398
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to make Langchain4j's TokenStream work with StreamingChatLanguageModel using ToolProvider?
How to make Langchain4j's TokenStream work with StreamingChatLanguageModel using ToolProvider? Im using the code below to generate an answer from Anthropic's Sonnet 3-7. When I add a tools/toolProvider to my streamAssistant, the code breaks every time I run a prompt that depends on a tool call. val model: Streamin...
https://stackoverflow.com/questions/79558398/how-to-make-langchain4js-tokenstream-work-with-streamingchatlanguagemodel-using
kotlin, streaming, large-language-model, langchain4j
1,743,953,840
se_79384059
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to Locate the Memory Directory in CrewAI and Use a Custom Directory?
How to Locate the Memory Directory in CrewAI and Use a Custom Directory? In CrewAI, when using memory=True for agents, where is the memory data stored by default? Is it possible to specify a custom directory for storing agent memory?
https://stackoverflow.com/questions/79384059/how-to-locate-the-memory-directory-in-crewai-and-use-a-custom-directory
large-language-model, agent, multi-agent, crewai
1,737,715,764
se_79552416
stackoverflow
ARTIFICIAL_INTELLIGENCE
Ollama run model failed with message "this model may be incompatible"
Ollama run model failed with message "this model may be incompatible" OS: Linux container of Docker Desktop 4.39.0 in Mac OSX 12.7 Ollama version: 0.0.0 Just downloaded model "Gemma3:latest" successfully: But can't run in the same bash terminal, got an error message like this (and can't be fixed by rerun "o...
https://stackoverflow.com/questions/79552416/ollama-run-model-failed-with-message-this-model-may-be-incompatible
large-language-model, ollama
1,743,669,802
se_79501178
stackoverflow
ARTIFICIAL_INTELLIGENCE
Store images instead of showing in a server
Store images instead of showing in a server I am running the code found on this site in my server and I would like to store images instead of showing them since I have connected remotely with an ssh connection to my server via an SSH connection. The code is for instance this one: skip_tokens = [1] # skip the special ...
https://stackoverflow.com/questions/79501178/store-images-instead-of-showing-in-a-server
python, nlp, large-language-model
1,741,704,631
se_79556171
stackoverflow
ARTIFICIAL_INTELLIGENCE
Inconsistent Results with Llama index parser?
Inconsistent Results with Llama index parser? My team and I are using LlamaIndex's LlamaParse to read in PowerPoint documents. We've noticed inconsistency issues when running the same user_prompt setup for multiple files in one run. We have a small pipeline set up to run through each PowerPoint file in a file path, pa...
https://stackoverflow.com/questions/79556171/inconsistent-results-with-llama-index-parser
python, parsing, powerpoint, large-language-model, llama-index
1,743,796,984
se_78561599
stackoverflow
ARTIFICIAL_INTELLIGENCE
Crewai - Can I use a Custom embedder in the crewai_tools?
Crewai - Can I use a Custom embedder in the crewai_tools? I am trying to use the the crewai_tools, the RAG tools in particular. Lets take the DirectorySearchTool() in this case. How do I use a custom embedder provider? The only options that embed chain have are from the following list. 'openai', 'gpt4all', 'huggingfac...
https://stackoverflow.com/questions/78561599/crewai-can-i-use-a-custom-embedder-in-the-crewai-tools
large-language-model, multi-agent, crewai
1,717,179,327
se_79050217
stackoverflow
ARTIFICIAL_INTELLIGENCE
Has anyone successfully converted a PyTorch-based LLM to ONNX Runtime to reduce file size?
Has anyone successfully converted a PyTorch-based LLM to ONNX Runtime to reduce file size? I’m exploring the idea of converting PyTorch and TensorFlow models to ONNX Runtime to optimize performance and reduce file sizes. Since most large language models (LLMs) are built using PyTorch, I was wondering if anyone has suc...
https://stackoverflow.com/questions/79050217/has-anyone-successfully-converted-a-pytorch-based-llm-to-onnx-runtime-to-reduce
pytorch, large-language-model, onnx, onnxruntime
1,727,953,201
se_79547571
stackoverflow
ARTIFICIAL_INTELLIGENCE
LLM caused VS Code to be suddenly closed
LLM caused VS Code to be suddenly closed I installed and run gemma3 with Python, and I was using VS Code editor. I programmed it to receive output in structured format, and when I asked the LLM to generate two class instances, it successfully did that. But when I asked it to generate 30 instances, the execution time t...
https://stackoverflow.com/questions/79547571/llm-caused-vs-code-to-be-suddenly-closed
python, large-language-model
1,743,471,758
se_79538530
stackoverflow
ARTIFICIAL_INTELLIGENCE
Agents - Facilitating tool calling and underuse of tools with LiteLLM and Gemini
Agents - Facilitating tool calling and underuse of tools with LiteLLM and Gemini I am using LiteLLM and Gemini-2.0-Flash to make an agent that is used to solve simple terminal queries (e.g. Find and list the contents of the file "cat.txt"). I've defined the tools, and the goal is for the LLM agent to make use of them ...
https://stackoverflow.com/questions/79538530/agents-facilitating-tool-calling-and-underuse-of-tools-with-litellm-and-gemini
python, large-language-model, agent, litellm
1,743,070,646
se_79542324
stackoverflow
ARTIFICIAL_INTELLIGENCE
Constrain Llama3.2-vision output to a list of options
Constrain Llama3.2-vision output to a list of options I have several images of animals in the same directory as the script. How can I modify the following script to process an image but force the output to only be a single selection from a list: from pathlib import Path import base64 import requests def encode_image_...
https://stackoverflow.com/questions/79542324/constrain-llama3-2-vision-output-to-a-list-of-options
python, large-language-model, ollama
1,743,192,066
se_79503213
stackoverflow
ARTIFICIAL_INTELLIGENCE
Does gemini provide async prompting like anthropic and openai?
Does gemini provide async prompting like anthropic and openai? I've been using gemini for the summarization of multi-page pdfs and using the chunking technique, but as the parallel processing is being managed through the code, it's a bit slower. I believe Async API will solve my problem, but I couldn't find it in the ...
https://stackoverflow.com/questions/79503213/does-gemini-provide-async-prompting-like-anthropic-and-openai
google-cloud-platform, large-language-model, google-gemini
1,741,773,488
se_78357062
stackoverflow
ARTIFICIAL_INTELLIGENCE
ImportError: Could not import chromadb python package. Please install it with `pip install chromadb`
ImportError: Could not import chromadb python package. Please install it with `pip install chromadb` I am trying to build a Chat PDF application using langchain, During this I installed all the necessary packages, but there is one issue with this chromadb, which no matter what I do, it keeps showing the error. I insta...
https://stackoverflow.com/questions/78357062/importerror-could-not-import-chromadb-python-package-please-install-it-with-p
langchain, large-language-model, chromadb
1,713,590,112
se_79535790
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to Reduce time when formatting the Cypher result?
How to Reduce time when formatting the Cypher result? I'm retrieving results from a Cypher query, which includes the article's date and text. After fetching the results, I'm formatting them before passing them to the LLM for response generation. Currently, I'm using the following approach for formatting: context_text ...
https://stackoverflow.com/questions/79535790/how-to-reduce-time-when-formatting-the-cypher-result
python, large-language-model, rag
1,742,977,431
se_79513881
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to Fine-Tune Projection Layer in CLIP Model Using LoRA?
How to Fine-Tune Projection Layer in CLIP Model Using LoRA? I'm trying to fine-tune the projection layers in the CLIP model using LoRA. I need help identifying the exact projection layers to modify for my fine-tuning and how I can apply LoRA to them. Model loading: import clip device = "cuda" if torch.cuda.is_availab...
https://stackoverflow.com/questions/79513881/how-to-fine-tune-projection-layer-in-clip-model-using-lora
nlp, artificial-intelligence, large-language-model, image-text
1,742,197,071
se_78321978
stackoverflow
ARTIFICIAL_INTELLIGENCE
'Chroma' object has no attribute 'persist'
'Chroma' object has no attribute 'persist' I'm persisting the Chroma Database but it's giving me an error. I'm basically redoing what's in this link. https://github.com/hwchase17/chroma-langchain/blob/master/persistent-qa.ipynb Is there any update in chromadb version and they have removed persist I don...
https://stackoverflow.com/questions/78321978/chroma-object-has-no-attribute-persist
langchain, large-language-model, persist, chromadb, vector-database
1,713,041,220
se_79131911
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to replace the deprecated 'conversational' pipeline in Hugging Face Transformers?
How to replace the deprecated 'conversational' pipeline in Hugging Face Transformers? I'm working on a chatbot using Hugging Face's Transformers library. I was previously using the conversational pipeline, but it seems that it has been deprecated. Here is the code I was using: # Initialize the conversational p...
https://stackoverflow.com/questions/79131911/how-to-replace-the-deprecated-conversational-pipeline-in-hugging-face-transfor
python, huggingface-transformers, large-language-model
1,730,082,528
se_79528211
stackoverflow
ARTIFICIAL_INTELLIGENCE
Florence2 Torch JiT Inference
Florence2 Torch JiT Inference I am using the Florence2 model and trying to speed up inference through torch.jit.trace() Orig model - import torch from transformers import AutoProcessor, AutoModelForCausalLM from PIL import Image model = AutoModelForCausalLM.from_pretrained( "microsoft/Florence-2-large", torch...
https://stackoverflow.com/questions/79528211/florence2-torch-jit-inference
pytorch, torch, large-language-model, huggingface
1,742,682,607
se_77503261
stackoverflow
ARTIFICIAL_INTELLIGENCE
Changing examples value in langchain chain
Changing examples value in langchain chain Assuming we have langchain chain my_chain created using my_schema via: from langchain.chat_models import ChatOpenAI from kor.extraction import create_extraction_chain from kor.nodes import Object, Text, Number from langchain.chat.models import ChatOpenAI from langchain.llms ...
https://stackoverflow.com/questions/77503261/changing-examples-value-in-langchain-chain
python, nlp, langchain, large-language-model, chatgpt-api
1,700,238,992
se_79280850
stackoverflow
ARTIFICIAL_INTELLIGENCE
langchain_ollama attach image to prompt
langchain_ollama attach image to prompt I'm expirementing with llama 3.2 vision 11B and I'm having a bit of a rough time attaching an image, wether it's local or online, to the chat. Here's my Python code: import io import base64 import requests from PIL import Image from langchain_ollama import OllamaLLM from langcha...
https://stackoverflow.com/questions/79280850/langchain-ollama-attach-image-to-prompt
large-language-model, llama, ollama, multimodal
1,734,188,416
se_79522921
stackoverflow
ARTIFICIAL_INTELLIGENCE
Add new field in existing FAISS vector store
Add new field in existing FAISS vector store I have a csv file containing multiple fields and from that I am only adding the first_name & last_name and making unique id using uuid to the vectorstore. I want to add one more field from my csv to this vector only. This is my code which I wrote in order to make the vector...
https://stackoverflow.com/questions/79522921/add-new-field-in-existing-faiss-vector-store
python, langchain, large-language-model, faiss
1,742,473,300
se_76853170
stackoverflow
ARTIFICIAL_INTELLIGENCE
setting temperature in Open Llama does not work
setting temperature in Open Llama does not work I try to generate several alternative continuations of given prompt with Open Llama, setting nonzero temperature: import re import torch from transformers import LlamaTokenizer, LlamaForCausalLM model_path = 'openlm-research/open_llama_3b_v2' tokenizer = LlamaTokenizer...
https://stackoverflow.com/questions/76853170/setting-temperature-in-open-llama-does-not-work
python, large-language-model
1,691,422,362
se_79517603
stackoverflow
ARTIFICIAL_INTELLIGENCE
Use multiple API model providers with aider
Use multiple API model providers with aider Is it possible to use aider with the weak model from OpenAI and the default model form glhf.chat (and possibly the code model from another provider)? How? My current configuration is as follow: ~/aider.conf.yml openai-api-base: https://glhf.chat/api/openai/v1 openai-api-key:...
https://stackoverflow.com/questions/79517603/use-multiple-api-model-providers-with-aider
configuration, large-language-model, aider
1,742,304,656
se_79517581
stackoverflow
ARTIFICIAL_INTELLIGENCE
Configure Aider with custom models?
Configure Aider with custom models? I would like to use Aider with models hosted on glhf.chat. I use this configuration: ~/aider.conf.yml openai-api-base: https://glhf.chat/api/openai/v1 openai-api-key: glhf_MY_SECRET_API_KEY model-settings-file: ~/.aider.model.settings.yml model: deepseek-ai/DeepSeek-R1 weak-model: d...
https://stackoverflow.com/questions/79517581/configure-aider-with-custom-models
configuration, large-language-model, aider
1,742,304,153
se_79518779
stackoverflow
ARTIFICIAL_INTELLIGENCE
Output inconsistency when using LLM batch inference compared to single input
Output inconsistency when using LLM batch inference compared to single input I found single LLM input get different output logits when merging into a batch for inference. Besides, I need to use inputs_embeds as model input. My test LLM is "Qwen/Qwen2.5-1.5B-Instruct" and the test code is below. from transformers impor...
https://stackoverflow.com/questions/79518779/output-inconsistency-when-using-llm-batch-inference-compared-to-single-input
pytorch, huggingface-transformers, large-language-model
1,742,338,710
se_79434482
stackoverflow
ARTIFICIAL_INTELLIGENCE
Trouble understanding the formula for estimating dense self-attention FLOPS per Token given as 6LH(2QT)
Trouble understanding the formula for estimating dense self-attention FLOPS per Token given as 6LH(2QT) In the appendix B of the PaLM paper (https://arxiv.org/pdf/2204.02311) it describes a metric called "Model Flops Utilization (MFU)" and the formula for estimating it. It's computation makes use of the stated fact th...
https://stackoverflow.com/questions/79434482/trouble-understanding-the-formula-for-estimating-dense-self-attention-flops-per
large-language-model, transformer-model, attention-model, self-attention
1,739,395,337
se_79490610
stackoverflow
ARTIFICIAL_INTELLIGENCE
How do I get google/gemma-2-2b to strictly follow my prompt in Hugging Face Transformers?
How do I get google/gemma-2-2b to strictly follow my prompt in Hugging Face Transformers? I'm using the following code to send a prompt to the "google/gemma-2-2b" model via Hugging Face's Transformers pipeline: from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline import torch HUGGINGFACE_TOKEN = "<m...
https://stackoverflow.com/questions/79490610/how-do-i-get-google-gemma-2-2b-to-strictly-follow-my-prompt-in-hugging-face-tran
python, prompt, large-language-model
1,741,292,674
se_79232737
stackoverflow
ARTIFICIAL_INTELLIGENCE
Cannot submit chat request to VLLM Pixtral in Python using MistralAI
Cannot submit chat request to VLLM Pixtral in Python using MistralAI I have a Pixtral server running locally. I have installed mistralai 1.2.3 on MacOS and am trying to interact with the server. When I run curl -X POST http://localhost:8000/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{"mo...
https://stackoverflow.com/questions/79232737/cannot-submit-chat-request-to-vllm-pixtral-in-python-using-mistralai
python, large-language-model, vllm
1,732,773,630
se_79514617
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to upload local LLM to private JFrog huggingface-ml repository?
How to upload local LLM to private JFrog huggingface-ml repository? I want to upload a local LLM to a private Jfrog "huggingface-ml" repository. First I have installed the HF python client: python3 -m pip install "huggingface_hub[cli]" With this client in place, I have created a simple download script to get unsloth/...
https://stackoverflow.com/questions/79514617/how-to-upload-local-llm-to-private-jfrog-huggingface-ml-repository
python, artifactory, large-language-model, huggingface
1,742,215,792
se_78571639
stackoverflow
ARTIFICIAL_INTELLIGENCE
How can I achieve persistent storage for colBERT embeddings?
How can I achieve persistent storage for colBERT embeddings? I am trying to develop a RAG pipeline with colBERT as embedding. I want to have a searchable, persistent storage of the knowledge base. How can I achieve that? I could see that RAGatouille framework provides an option to use FAISS for vector store. But could...
https://stackoverflow.com/questions/78571639/how-can-i-achieve-persistent-storage-for-colbert-embeddings
large-language-model, openaiembeddings
1,717,433,897
se_78377461
stackoverflow
ARTIFICIAL_INTELLIGENCE
Max len error when using Huggingface model
Max len error when using Huggingface model I am getting the issue lm = VLLM( File "/home/ubuntu/isolated_product_description/ipd/lib/python3.8/site-packages/langchain_core/load/serializable.py", line 120, in __init__ super().__init__(**kwargs) File "/home/ubuntu/isolated_product_description/ipd/lib/python3.8/s...
https://stackoverflow.com/questions/78377461/max-len-error-when-using-huggingface-model
langchain, large-language-model, vllm
1,713,952,106
se_79509243
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to Use Template in Langchain to Insert Results from Chain for Further Reasoning?
How to Use Template in Langchain to Insert Results from Chain for Further Reasoning? I'm working with Langchain and OpenAI to develop a conversational AI. I've integrated multiple tools into the chain and am using a template to structure the conversation. However, I'm stuck on how to use the results from the chain (ch...
https://stackoverflow.com/questions/79509243/how-to-use-template-in-langchain-to-insert-results-from-chain-for-further-reason
python, artificial-intelligence, chatbot, langchain, large-language-model
1,741,959,732
se_78216871
stackoverflow
ARTIFICIAL_INTELLIGENCE
Integrating llama index vectorstoreindex with Langchain agents for RAG Applications
Integrating llama index vectorstoreindex with Langchain agents for RAG Applications I have been reading the documentation all day and can't seem to wrap my head around how I can create a VectorStoreIndex with llama_index and use the created embeddings as supplemental information for a RAG application/chatbot that can ...
https://stackoverflow.com/questions/78216871/integrating-llama-index-vectorstoreindex-with-langchain-agents-for-rag-applicati
python, langchain, embedding, large-language-model, llama-index
1,711,335,018
se_79505679
stackoverflow
ARTIFICIAL_INTELLIGENCE
Meta llama 3.2 3b model local download
Meta llama 3.2 3b model local download I am installed the llamma3.2 model from meta directly and got it in this format -a---- 3/10/2025 3:22 PM 209 checklist.chk -a---- 3/10/2025 9:47 AM 6425585114 consolidated.00.pth -a---- 3/10/2025 9:27 AM 220 params.json -a--...
https://stackoverflow.com/questions/79505679/meta-llama-3-2-3b-model-local-download
python, large-language-model, llama
1,741,850,475
se_78446414
stackoverflow
ARTIFICIAL_INTELLIGENCE
Error Loading &quot;sentence-transformers/all-MiniLM-L6-v2&quot;
Error Loading &quot;sentence-transformers/all-MiniLM-L6-v2&quot; I have built a document question-answering system using llama-2, but while downloading the embedding model, I am getting an OSError. OSError: We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it l...
https://stackoverflow.com/questions/78446414/error-loading-sentence-transformers-all-minilm-l6-v2
python, large-language-model, huggingface
1,715,149,177
se_79498915
stackoverflow
ARTIFICIAL_INTELLIGENCE
Comparing the similarity of spoken and written form text
Comparing the similarity of spoken and written form text I'm converting spoken form text to its written form. For example, "he owes me two-thousand dollars" should be converted to "he owes me $2,000" . I want an automatic check, to judge if the conversion was right or not. Can i use sentence transformers to compare th...
https://stackoverflow.com/questions/79498915/comparing-the-similarity-of-spoken-and-written-form-text
nlp, large-language-model
1,741,632,959
se_79501263
stackoverflow
ARTIFICIAL_INTELLIGENCE
Calculate the gradient with respect to attention but also the FFN layers for a pre-trained LLMs
Calculate the gradient with respect to attention but also the FFN layers for a pre-trained LLMs I would like to return the gradient with respect to specific layers and the FFN layer in the Transformer architecture of pre-trained LLMs from the hugging-face model. Is that even possible? I am working with the code of thi...
https://stackoverflow.com/questions/79501263/calculate-the-gradient-with-respect-to-attention-but-also-the-ffn-layers-for-a-p
python, pytorch, nlp, large-language-model
1,741,706,517
se_76405986
stackoverflow
ARTIFICIAL_INTELLIGENCE
In LangChain, how to save the verbose output to a variable?
In LangChain, how to save the verbose output to a variable? I tried executing a langchain agent. I want to save the output from verbose into a variable, but all I can access from the agent.run is only the final answer. How can I save the verbose output to a variable so that I can use later? My code: import json from l...
https://stackoverflow.com/questions/76405986/in-langchain-how-to-save-the-verbose-output-to-a-variable
agent, openai-api, langchain, large-language-model
1,685,964,674
se_78526759
stackoverflow
ARTIFICIAL_INTELLIGENCE
Visualizing SQL Data using Generative AI
Visualizing SQL Data using Generative AI I am seeking a solution for data visualization using Generative AI that works on databases containing multiple tables. While I have found solutions like PandasAI and LIDA that work with a single CSV file or a single SQL table, I need something more comprehensive that works with...
https://stackoverflow.com/questions/78526759/visualizing-sql-data-using-generative-ai
sql, chatbot, langchain, large-language-model
1,716,531,275
se_77701433
stackoverflow
ARTIFICIAL_INTELLIGENCE
ValueError: You are trying to offload the whole model to the disk. Please use the `disk_offload` function instead
ValueError: You are trying to offload the whole model to the disk. Please use the `disk_offload` function instead I am trying to run a GitHub project on my computer. GitHub Repo that I am trying to run This is the code snippet that is causing errors. Steps I took for replicating the project are: Cloned the repositor...
https://stackoverflow.com/questions/77701433/valueerror-you-are-trying-to-offload-the-whole-model-to-the-disk-please-use-th
python, nlp, large-language-model, pre-trained-model, llama
1,703,211,929
se_79493986
stackoverflow
ARTIFICIAL_INTELLIGENCE
Error during SFT training of Qwen2.5-Coder-1.5B: &quot;element 0 of tensors does not require grad and does not have a grad_fn&quot;have a grad_fn`
Error during SFT training of Qwen2.5-Coder-1.5B: &quot;element 0 of tensors does not require grad and does not have a grad_fn&quot;have a grad_fn` I'm encountering an error during the supervised fine-tuning (SFT) of Qwen2.5-Coder-1.5B. The error, shown in the log below, seems to indicate that something is interrupting...
https://stackoverflow.com/questions/79493986/error-during-sft-training-of-qwen2-5-coder-1-5b-element-0-of-tensors-does-not
python, pytorch, large-language-model
1,741,415,315
se_79484024
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to solve RuntimeError: Tensors must have same number of dimensions: got 2 and 3?
How to solve RuntimeError: Tensors must have same number of dimensions: got 2 and 3? i am trying to run newly announced model: Phi-4-mini-instruct https://huggingface.co/microsoft/Phi-4-mini-instruct It has example, I tried it on Google Colab T4 Notebook, but here is what I got import torch from transformers import Au...
https://stackoverflow.com/questions/79484024/how-to-solve-runtimeerror-tensors-must-have-same-number-of-dimensions-got-2-an
python, runtime-error, tensor, large-language-model
1,741,099,448
se_79488543
stackoverflow
ARTIFICIAL_INTELLIGENCE
What to include in context precision/recall for RAG LLM evaluation
What to include in context precision/recall for RAG LLM evaluation I am doing evaluation for my RAG LLM application using ragas. I have the prompt instruction to describe some rules, the retrieved content from my retriever, and chat history together for the LLM to do question answering. When I do the evaluation for co...
https://stackoverflow.com/questions/79488543/what-to-include-in-context-precision-recall-for-rag-llm-evaluation
python, large-language-model, rag, ragas
1,741,245,705
se_77391069
stackoverflow
ARTIFICIAL_INTELLIGENCE
Parsing error on langchain agent with gpt4all llm
Parsing error on langchain agent with gpt4all llm I am trying to integrate GPT4All with serpapi agent from langchain. But I am getting parsing error. Agent unable to parse llm output. I beleive the agent is expecting an output Thought: .... but not getting one, may I get some help here? from langchain.llms import GPT...
https://stackoverflow.com/questions/77391069/parsing-error-on-langchain-agent-with-gpt4all-llm
langchain, google-search-api, large-language-model, py-langchain, gpt4all
1,698,690,718
se_79482290
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to handle German language specific characters like (&#228;, &#246;, &#252;, &#223;) while tokenizing using GPT2Tokenizer?
How to handle German language specific characters like (&#228;, &#246;, &#252;, &#223;) while tokenizing using GPT2Tokenizer? I am working with German Texts, where I need to tokenize texts using GPT2Tokenizer. To tokenize the text, I wrote the implementation as follows: from transformers import GPT2Tokenizer text = "...
https://stackoverflow.com/questions/79482290/how-to-handle-german-language-specific-characters-like-%c3%a4-%c3%b6-%c3%bc-%c3%9f-while-tokeni
python, nlp, tokenize, large-language-model, gpt-2
1,741,041,156
se_79393384
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to get LLMs to accurately infer relative days of the week
How to get LLMs to accurately infer relative days of the week I've been working on an LLM application that often needs to utilize relative days of the week from natural language - e.g if today is 2025-01-28 then this Friday should be 2025-01-31 however as much as I try to prompt and feed it dates, most LLMs I try perf...
https://stackoverflow.com/questions/79393384/how-to-get-llms-to-accurately-infer-relative-days-of-the-week
openai-api, large-language-model, google-gemini, claude
1,738,058,267
se_78164797
stackoverflow
ARTIFICIAL_INTELLIGENCE
Could not find a version that satisfies the requirement llama-index-finetuning-cross-encoders
Could not find a version that satisfies the requirement llama-index-finetuning-cross-encoders I'm trying to run this Llama Index How to Finetune a cross-encoder using LLamaIndex. But I cannot install llama-index-finetuning-cross-encoders package. I tried this code %pip install llama-index-finetuning-cross-encoders Bu...
https://stackoverflow.com/questions/78164797/could-not-find-a-version-that-satisfies-the-requirement-llama-index-finetuning-c
pytorch, large-language-model, llama-index, fine-tuning
1,710,479,549
se_79480061
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to increase the generation throughput of Qwen-0.5B of vllm
How to increase the generation throughput of Qwen-0.5B of vllm I am currently utilizing vLLM serve to deploy the Qwen-0.5B model on an Nvidia H20 GPU. During this process, I've observed that the GPU utilization as reported by nvidia-smi remains at approximately 70%. Despite attempts to optimize the vLLM engine paramet...
https://stackoverflow.com/questions/79480061/how-to-increase-the-generation-throughput-of-qwen-0-5b-of-vllm
large-language-model, throughput, vllm
1,740,969,492
se_79192130
stackoverflow
ARTIFICIAL_INTELLIGENCE
Using an AWS service to execute a python script that will extract keywords from text using keyBERT?
Using an AWS service to execute a python script that will extract keywords from text using keyBERT? I have a simple python script that is given two blocks of text, it then extracts the keywords from them using keyBERT, and then compares the lists of keywords to sort them into two lists depending on if the lists share ...
https://stackoverflow.com/questions/79192130/using-an-aws-service-to-execute-a-python-script-that-will-extract-keywords-from
python, amazon-web-services, aws-lambda, nlp, large-language-model
1,731,669,216
se_78363158
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to set location in Langchain for Google ChatVertexAI model
How to set location in Langchain for Google ChatVertexAI model Is there anyone know how to set location in Langchain for Google ChatVertexAI model? Langchain document does not mention this. I have tried with following way but did not work, still use default 'us-central1' location in my tests. import { ChatVertexAI } f...
https://stackoverflow.com/questions/78363158/how-to-set-location-in-langchain-for-google-chatvertexai-model
langchain, large-language-model, google-cloud-vertex-ai
1,713,733,574
se_79469166
stackoverflow
ARTIFICIAL_INTELLIGENCE
Is there a way to initialize a LLM with a set of instructions and deploy this model with this initial prompt in memory?
Is there a way to initialize a LLM with a set of instructions and deploy this model with this initial prompt in memory? In a project i'm currently working on, I have a information extraction task to do with a LLM that requires a large set of instructions. Those instructions contains an object schema (and schema of com...
https://stackoverflow.com/questions/79469166/is-there-a-way-to-initialize-a-llm-with-a-set-of-instructions-and-deploy-this-mo
python, langchain, large-language-model, azure-ai
1,740,561,972
se_76844957
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to make a Chatbot with Langchain that has access to custom data and the internet?
How to make a Chatbot with Langchain that has access to custom data and the internet? Very strange it doesn't find a good response. When I print(response["answer"]) I get that there is no text to give to the query I put. Even if it gets information from the internet and the Document on the list seems good structured. ...
https://stackoverflow.com/questions/76844957/how-to-make-a-chatbot-with-langchain-that-has-access-to-custom-data-and-the-inte
python, chatbot, langchain, large-language-model
1,691,309,222
se_78842047
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to quantize a HF safetensors model and save it to llama.cpp GGUF format with less than q8_0 quantization?
How to quantize a HF safetensors model and save it to llama.cpp GGUF format with less than q8_0 quantization? I'm developing LLM agents using llama.cpp as inference engine. Sometimes I want to use models in safetensors format and there is a python script (https://github.com/ggerganov/llama.cpp/blob/master/convert_hf_t...
https://stackoverflow.com/questions/78842047/how-to-quantize-a-hf-safetensors-model-and-save-it-to-llama-cpp-gguf-format-with
large-language-model, huggingface, quantization, llamacpp
1,723,011,038
se_79468482
stackoverflow
ARTIFICIAL_INTELLIGENCE
&quot;NotImplementedError&quot; encountered while &quot;llm.bind_tools()&quot;
&quot;NotImplementedError&quot; encountered while &quot;llm.bind_tools()&quot; I'm learning the langgraph tutorial code. When I used a customized llm which was inherited from the BaseChatModel, then the NotImplementedError occured. Here's my code: from typing import List from langchain_core.messages import SystemMessa...
https://stackoverflow.com/questions/79468482/notimplementederror-encountered-while-llm-bind-tools
python, langchain, large-language-model, agent, langgraph
1,740,542,233
se_79267880
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to use JSON format equivalent in ChatGroq from langchain_groq?
How to use JSON format equivalent in ChatGroq from langchain_groq? I am using langchain with the langchain_ollama and langchain_groq integrations to process natural language tasks. When working with ChatOllama from langchain_ollama, I can use the format="json" parameter like this: from langchain_ollama import ChatOlla...
https://stackoverflow.com/questions/79267880/how-to-use-json-format-equivalent-in-chatgroq-from-langchain-groq
python, json, langchain, large-language-model
1,733,826,558
se_79457389
stackoverflow
ARTIFICIAL_INTELLIGENCE
What is the best practice to upload and answer question on a one-time-use PDF on Azure programmatically with Python?
What is the best practice to upload and answer question on a one-time-use PDF on Azure programmatically with Python? I wanna upload a file programmatically, then answer questions only based on the content of the PDF. The PDF does not need to be persisted for future use. I found that Azure documentation piece there it ...
https://stackoverflow.com/questions/79457389/what-is-the-best-practice-to-upload-and-answer-question-on-a-one-time-use-pdf-on
python, azure, large-language-model
1,740,141,601
se_79463986
stackoverflow
ARTIFICIAL_INTELLIGENCE
Issue with running LLM
Issue with running LLM I have a RX 6600 XT and Ryzen 7 5700G and I am trying to run the deepseek r1 qweb 7b instill model from huggingface after downloading the model weights, the tokenizer and normal config and the weight's index. I am trying to make the code work and run it. Please explain why my code stops after mo...
https://stackoverflow.com/questions/79463986/issue-with-running-llm
debugging, pytorch, localhost, large-language-model, deepseek
1,740,409,283
se_79461394
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to convert this complex Future returning function to a Stream?
How to convert this complex Future returning function to a Stream? To be clear I don't simply want to convert the Future to a Stream object, I want to change the internal behavior of the function to support streaming the LLM response rather than returning the final result. I have a method that handles communication wi...
https://stackoverflow.com/questions/79461394/how-to-convert-this-complex-future-returning-function-to-a-stream
flutter, dart, large-language-model, google-cloud-vertex-ai
1,740,321,316
se_79454961
stackoverflow
ARTIFICIAL_INTELLIGENCE
Why can we run LLM on Android?
Why can we run LLM on Android? PocketPal or termux with ollama can run LLM with billions of parameters on Android. I'm not an Android developer, but from its document, Android sets a limit on app's memory usage (256MB or so). Apparently, the above two facts conflict with each other. Can you explain why?
https://stackoverflow.com/questions/79454961/why-can-we-run-llm-on-android
android, memory, large-language-model
1,740,064,274
se_79456467
stackoverflow
ARTIFICIAL_INTELLIGENCE
Python request LM Studio Model failed but Curl successful
Python request LM Studio Model failed but Curl successful I tried to request local model by using Python with below code, import requests import json url = 'http://localhost:1234/v1/chat/completions' headers = { 'Content-Type': 'application/json' } data = { 'model': 'deepseek-r1-distill-qwen-7b', 'messa...
https://stackoverflow.com/questions/79456467/python-request-lm-studio-model-failed-but-curl-successful
python, large-language-model, rag, lm-studio
1,740,117,982
se_78913353
stackoverflow
ARTIFICIAL_INTELLIGENCE
Why does Llava (running on Ollama) ignore the system prompt sometimes?
Why does Llava (running on Ollama) ignore the system prompt sometimes? I have installed Ollama and have pull the Llava model. I am querying a set of images (around 200) with the same question. I have followed the prompt format as stated here [INST] {{ if .System }}{{ .System }} {{ end }}{{ .Prompt }} [/INST] I have w...
https://stackoverflow.com/questions/78913353/why-does-llava-running-on-ollama-ignore-the-system-prompt-sometimes
large-language-model, ollama
1,724,658,811
se_78348036
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to call AWS Bedrock asynchronously
How to call AWS Bedrock asynchronously Is there a way to call Bedrock claude3 model with Python SDK asynchronously? More specifically, I want the results to be sent to S3.
https://stackoverflow.com/questions/78348036/how-to-call-aws-bedrock-asynchronously
python, large-language-model, amazon-bedrock
1,713,448,797
se_78574125
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to making async calls to Amazon Bedrock
How to making async calls to Amazon Bedrock We were trying to make calls in parallel to LLMs hosted in Bedrock, from a lambda layer (in python) only to discover that boto3 does not support async. Is there any workaround? I am looking into aiobotocore / aioboto3, but I do not find any example with Bedrock. Any hint app...
https://stackoverflow.com/questions/78574125/how-to-making-async-calls-to-amazon-bedrock
python, amazon-web-services, asynchronous, large-language-model, amazon-bedrock
1,717,488,692
se_78721054
stackoverflow
ARTIFICIAL_INTELLIGENCE
Converting PDFs to Markdown for Higher Quality Embeddings with Langchain.js
Converting PDFs to Markdown for Higher Quality Embeddings with Langchain.js I am working on RAG LLM projects with Langchain.js using Node.js. Most of the data I retrieve are PDFs and a bit of JSON. For higher quality, I would like to convert my PDFs into Markdown before embedding starts. This involves deleting headers...
https://stackoverflow.com/questions/78721054/converting-pdfs-to-markdown-for-higher-quality-embeddings-with-langchain-js
pdf, markdown, langchain, large-language-model, retrieval-augmented-generation
1,720,444,354
se_79325427
stackoverflow
ARTIFICIAL_INTELLIGENCE
How to get this C# code working for HuggingFace models
How to get this C# code working for HuggingFace models I am doing some research and I have to use LLM models on different platforms APIs 1- OpenAI ChatGPT 4 2- Groq Llama 3.2 3- HuggingFace Llama 3.3 I built code that works on OpenAI ChatGPT 4 & Groq Llama 3.2 but when I tried to call HuggingFace Llama 3.3 it failed...
https://stackoverflow.com/questions/79325427/how-to-get-this-c-code-working-for-huggingface-models
openai-api, large-language-model, huggingface, groq
1,735,874,420
se_79436706
stackoverflow
ARTIFICIAL_INTELLIGENCE
Every time I open OpenWebUI, have to redownload the models
Every time I open OpenWebUI, have to redownload the models I have installed Docker on Windows 10 and subsequently set up ollama and openwebui within Docker. The command used to install ollama was: docker run --gpus all -d -v /opt/ai/ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama The command used to in...
https://stackoverflow.com/questions/79436706/every-time-i-open-openwebui-have-to-redownload-the-models
large-language-model, ollama
1,739,459,050
se_79428887
stackoverflow
ARTIFICIAL_INTELLIGENCE
No matter how low is the GPU Vram is set in max_memory, the loading of the model throws error
No matter how low is the GPU Vram is set in max_memory, the loading of the model throws error On one Nvidia 4070 Super with 12GB VRAM, the loading of deepseek "deepseek-ai/deepseek-llm-7b-chat" model constantly throws error even the GPU VRAM is set at as low as 4GB in max_memory: Error loading quantized model: Some mo...
https://stackoverflow.com/questions/79428887/no-matter-how-low-is-the-gpu-vram-is-set-in-max-memory-the-loading-of-the-model
pytorch, large-language-model, deepseek
1,739,248,144
se_79439095
stackoverflow
ARTIFICIAL_INTELLIGENCE
Remove GPU Ram with VLLM
Remove GPU Ram with VLLM After running this code within a jupyter notebook, it runs properly. However, the memory is still stored in the GPU. How do I get rid of this memory to clear up space on my GPU. Sorry if I am formatting this question poorly, I am not used to posting. Provided is the code: llm = LLM( model=mo...
https://stackoverflow.com/questions/79439095/remove-gpu-ram-with-vllm
python, pytorch, out-of-memory, large-language-model
1,739,529,802
se_77613507
stackoverflow
ARTIFICIAL_INTELLIGENCE
Training llm for Query Generation in a Graph Database
Training llm for Query Generation in a Graph Database If I have developed a graph database which has its own query language. I have to find a way to feed llm the graph and then llm should be able to generate the queries of our database. I have found something similar in langchain that we can feed it the rdf file and t...
https://stackoverflow.com/questions/77613507/training-llm-for-query-generation-in-a-graph-database
machine-learning, nlp, sparql, langchain, large-language-model
1,701,869,646
se_79276279
stackoverflow
ARTIFICIAL_INTELLIGENCE
Test a Perplexity API key on python
Test a Perplexity API key on python I don't find an efficient way to check if an api key of perplexity is valid, either on python or anything. Indeed, for openai I do : def check_openai_api_key(api_key): openai.api_key = api_key try: openai.Model.list() except openai.error.AuthenticationError as e:...
https://stackoverflow.com/questions/79276279/test-a-perplexity-api-key-on-python
python, openai-api, large-language-model, perplexity
1,734,029,803