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_79902404 | stackoverflow | ARTIFICIAL_INTELLIGENCE | NL-to-SQL pipeline with PostgreSQL — join path selection, reserved word errors, and query accuracy | NL-to-SQL pipeline with PostgreSQL — join path selection, reserved word errors, and query accuracy
i'm building a Natural Language to SQL system that;
Connects to any PostgreSQL database and auto-introspects schema using information_schema
Builds a graph of table relationships using NetworkX
Uses sentence-transform... | https://stackoverflow.com/questions/79902404/nl-to-sql-pipeline-with-postgresql-join-path-selection-reserved-word-errors | python, postgresql, machine-learning, large-language-model | 1,772,815,311 |
se_79899810 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to bridge existing W3C Web Services to a Model Context Protocol (MCP) Server for LLM consumption? | How to bridge existing W3C Web Services to a Model Context Protocol (MCP) Server for LLM consumption?
I have a set of established Web Services (W3C) on IIS servers and I want to expose their functionalities to LLMs using the Model Context Protocol (MCP). What is the recommended architectural pattern for connecting the... | https://stackoverflow.com/questions/79899810/how-to-bridge-existing-w3c-web-services-to-a-model-context-protocol-mcp-server | large-language-model, model-context-protocol | 1,772,502,041 |
se_79899925 | stackoverflow | ARTIFICIAL_INTELLIGENCE | G6e.24xlarge vs G7e.12xlarge EC2 Instance Recomendation | G6e.24xlarge vs G7e.12xlarge EC2 Instance Recomendation
I am planning to deploy llama 3.3 70b(FP8) Model in my EC2 instance, and I am wondering which would be good for better performance, GPU memory utilization, and operational complexity?
I will be just deploying this single model in my ec2 so can you suggest which I... | https://stackoverflow.com/questions/79899925/g6e-24xlarge-vs-g7e-12xlarge-ec2-instance-recomendation | amazon-web-services, amazon-ec2, gpu, large-language-model, llama | 1,772,523,014 |
se_79900580 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Private AI Chatbot | Private AI Chatbot
How to build an AI-powered chatbot for a company that can answer users' questions based on company-specific data, interact with users through natural question-and-answer conversations similar to other advanced chatbots (such as ChatGPT, Claude, or DeepSeek), calculate stock levels, and intelligently... | https://stackoverflow.com/questions/79900580/private-ai-chatbot | python, artificial-intelligence, chatbot, large-language-model | 1,772,594,342 |
se_76933522 | stackoverflow | ARTIFICIAL_INTELLIGENCE | RecursiveCharacterTextSplitter of Langchain doesn't exist | RecursiveCharacterTextSplitter of Langchain doesn't exist
I am trying to do a text chunking by LangChain's RecursiveCharacterTextSplitter model. I have install langchain(pip install langchain[all]), but the program still report there is no RecursiveCharacterTextSplitter package. I use from langchain.text_splitter ... | https://stackoverflow.com/questions/76933522/recursivecharactertextsplitter-of-langchain-doesnt-exist | python, langchain, large-language-model, text-chunking | 1,692,417,552 |
se_79891324 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Agent which parses website through its file and folder | Agent which parses website through its file and folder
I want to build an npm package which any business can install into their project which then parses it and create client tools which will mimic a real user on the website. The main idea is to help users navigate the website easily, fill forms, see different section... | https://stackoverflow.com/questions/79891324/agent-which-parses-website-through-its-file-and-folder | npm, web, artificial-intelligence, large-language-model, agent | 1,771,394,207 |
se_79887762 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Looking for a local AI model and server that can do Copilot Agent mode in VSCode | Looking for a local AI model and server that can do Copilot Agent mode in VSCode
VSCode lets you access models served from Ollama. But in the Manage Models selection screen, only the models hosted by services like OpenAI, Claude, etc. show "Capabilities" that are required for enabling the Agent mode. I've tried a few ... | https://stackoverflow.com/questions/79887762/looking-for-a-local-ai-model-and-server-that-can-do-copilot-agent-mode-in-vscode | visual-studio-code, artificial-intelligence, large-language-model, github-copilot | 1,770,850,051 |
se_79888536 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Should you use a base model or instruction tuned model when LoRA fine-tuning an LLM? | Should you use a base model or instruction tuned model when LoRA fine-tuning an LLM?
I am trying to learn how to fine-tune models with the Huggingface suite of libraries (Transformers, PEFT, and TRL). On the Huggingface Hub there are many models that have base and instruction-tuned variants with the base model only ha... | https://stackoverflow.com/questions/79888536/should-you-use-a-base-model-or-instruction-tuned-model-when-lora-fine-tuning-an | huggingface-transformers, large-language-model, fine-tuning | 1,770,957,359 |
se_78010681 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Implementing System Prompts in Gemini Pro for Chatbot Creation | Implementing System Prompts in Gemini Pro for Chatbot Creation
I am in the process of learning and developing a chatbot using Gemini Pro. My previous experience includes extensive use of the GPT API, where I became familiar with a concept of "system prompts". In the chat history of GPT, there are three types of messag... | https://stackoverflow.com/questions/78010681/implementing-system-prompts-in-gemini-pro-for-chatbot-creation | large-language-model, google-cloud-vertex-ai, google-gemini | 1,708,133,797 |
se_78023750 | stackoverflow | ARTIFICIAL_INTELLIGENCE | use embeddings stored in vector db to reduce work for LLM generating response | use embeddings stored in vector db to reduce work for LLM generating response
I'm trying to understand what the correct strategy is for storing and using embeddings in a vector database, to be used with an LLM. If my goal is to reduce the amount of work the LLM has to do when generating a response, (So you can think ... | https://stackoverflow.com/questions/78023750/use-embeddings-stored-in-vector-db-to-reduce-work-for-llm-generating-response | openai-api, langchain, large-language-model, vector-database | 1,708,379,938 |
se_79885044 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to implement loglikelihood() for an MLX-based lm-evaluation-harness using mlx_lm? | How to implement loglikelihood() for an MLX-based lm-evaluation-harness using mlx_lm?
I'm writing a custom lm-evaluation-harness model backend that runs inference through Apple's MLX framework via mlx_lm, so I can benchmark quantized LLMs natively on Apple Silicon without routing through PyTorch MPS.
The built-in mlx_... | https://stackoverflow.com/questions/79885044/how-to-implement-loglikelihood-for-an-mlx-based-lm-evaluation-harness-using-ml | python, benchmarking, large-language-model, apple-silicon, mlx | 1,770,495,370 |
se_78354163 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How may I yield outputs (llm tokens) from langgraph nodes? | How may I yield outputs (llm tokens) from langgraph nodes?
I am working on an AI agent based on langgraph framework. In the generation node, I should yield the llm generated tokens to frontend and proceed to the END node when generation is done.
However, the way I am receiving the llm tokens is by calling some interna... | https://stackoverflow.com/questions/78354163/how-may-i-yield-outputs-llm-tokens-from-langgraph-nodes | python-3.x, generator, langchain, large-language-model, langgraph | 1,713,534,751 |
se_79643096 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to compute text–image similarity under local inference with generative vision-language models (e.g. Qwen2.5-VL, Gemma 3)? | How to compute text–image similarity under local inference with generative vision-language models (e.g. Qwen2.5-VL, Gemma 3)?
I’ve been working with Qwen2.5-VL and Gemma3 locally, and I need to measure the similarity between text and image embeddings—similar to CLIP/SigLIP—but I’m resource-limited and can’t spin up ad... | https://stackoverflow.com/questions/79643096/how-to-compute-text-image-similarity-under-local-inference-with-generative-visio | large-language-model, similarity | 1,748,472,662 |
se_79883379 | stackoverflow | ARTIFICIAL_INTELLIGENCE | ETL Migration to Databricks via LLM Transpilation | ETL Migration to Databricks via LLM Transpilation
I have several ETL jobs from DataStage in .dsx format. I use a PowerShell script to automatically run the migration for a larger number of files. And one job migrates successfully, while another similar one no longer migrates.
My code:
$jobsPath = "C:\lakebridge_test\j... | https://stackoverflow.com/questions/79883379/etl-migration-to-databricks-via-llm-transpilation | databricks, large-language-model, claude | 1,770,284,727 |
se_79879183 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do IDEs like Cursor / Antigravity implement diff based code editing with accept/reject option while modifying existing code | How do IDEs like Cursor / Antigravity implement diff based code editing with accept/reject option while modifying existing code
when modifying a exiting code using these tools, instead of rewriting the whole file, the tool proposes changes inline , shows a diff, and lets you accept/reject the change (sometimes even pe... | https://stackoverflow.com/questions/79879183/how-do-ides-like-cursor-antigravity-implement-diff-based-code-editing-with-acc | visual-studio-code, ide, large-language-model, file-diffs | 1,769,753,979 |
se_79874746 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Good resources for learning GPU acceleration & distributed LLM training? | Good resources for learning GPU acceleration & distributed LLM training?
I’m looking to upskill in GPU acceleration and distributed training, particularly for LLMs and fine-tuning workflows.
I’m mainly interested in hands-on, practical resources (courses, certifications, or tutorials) that focus on Python/PyTorch—... | https://stackoverflow.com/questions/79874746/good-resources-for-learning-gpu-acceleration-distributed-llm-training | machine-learning, artificial-intelligence, gpu, large-language-model, fine-tuning | 1,769,187,392 |
se_79873328 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Is "Small-to-Large" model staging a reliable proxy for LoRA hyperparameter tuning and data validation? | Is "Small-to-Large" model staging a reliable proxy for LoRA hyperparameter tuning and data validation?
I am designing a fine-tuning pipeline for a production-grade LLM and am operating under a strict R&D budget. To optimize costs, I am considering a Small-to-Large staging strategy.
The Workflow:
Stage 1 (Lo... | https://stackoverflow.com/questions/79873328/is-small-to-large-model-staging-a-reliable-proxy-for-lora-hyperparameter-tunin | machine-learning, nlp, huggingface-transformers, large-language-model, fine-tuning | 1,769,042,862 |
se_79869294 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Python/GenAI/LLM: Best practices for asking follow‑up questions to clarify user intent in a chatbot | Python/GenAI/LLM: Best practices for asking follow‑up questions to clarify user intent in a chatbot
I’m building a chatbot using Python, pydantic_ai, google_genai, and the gemini‑2.0‑flash‑lite model. The bot includes a module responsible for retrieving context from a knowledge base (RAG). The knowledge base itself is... | https://stackoverflow.com/questions/79869294/python-genai-llm-best-practices-for-asking-follow-up-questions-to-clarify-user | python, algorithm, nlp, artificial-intelligence, large-language-model | 1,768,558,225 |
se_79871450 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Learning path and resources for fine-tuning LLMs | Learning path and resources for fine-tuning LLMs
As an undergraduate joining a research group, I have recently been involved in fine-tuning a large-language-model. However, I have zero background and would like to seek advice on the prerequisite learning path and resources for fine-tuning large models. | https://stackoverflow.com/questions/79871450/learning-path-and-resources-for-fine-tuning-llms | large-language-model | 1,768,850,879 |
se_79000078 | stackoverflow | ARTIFICIAL_INTELLIGENCE | DSPy "[error ] Failed to run or to evaluate example Example" when compiling | DSPy "[error ] Failed to run or to evaluate example Example" when compiling
I have a signature which classifies DOJ press releases according to whether they have a specific type of fraud or not:
class upc(dspy.Signature):
"""
Classify cases where medical provider bills for higher levels of service
... | https://stackoverflow.com/questions/79000078/dspy-error-failed-to-run-or-to-evaluate-example-example-when-compiling | large-language-model, dspy | 1,726,691,650 |
se_79860120 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to sync a local project folder into a browser-only online code editor? | How to sync a local project folder into a browser-only online code editor?
I’m using an online code editor that only runs in the browser. There’s no Git support, no zip upload, and no API.
The only way to manage files is through the UI (create file/folder, delete, edit content in the editor).
Right now, updating a pro... | https://stackoverflow.com/questions/79860120/how-to-sync-a-local-project-folder-into-a-browser-only-online-code-editor | playwright, large-language-model, model-context-protocol, claude-code | 1,767,526,378 |
se_79851882 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Update ChatMessageContent value in Semantic Kernel response | Update ChatMessageContent value in Semantic Kernel response
I have a simple chat bot built with Semantic Kernel:
var response = _chatCompletionService.GetChatMessageContentAsync(
chatHistory,
executionSettings: execSettings,
kernel: kernel);
In some cases I want to validate response from the model and... | https://stackoverflow.com/questions/79851882/update-chatmessagecontent-value-in-semantic-kernel-response | c#, artificial-intelligence, large-language-model, semantic-kernel | 1,766,250,345 |
se_79823740 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How is the output from prompt responses formated in the tools? | How is the output from prompt responses formated in the tools?
I am trying to implement an application which displays the output from text generated by LLM, using the code from https://docs.ollama.com/quickstart#python.
I noticed, that for longer prompt, the response is in Markup (e.g. added double stars as bold etc.)... | https://stackoverflow.com/questions/79823740/how-is-the-output-from-prompt-responses-formated-in-the-tools | large-language-model | 1,763,492,750 |
se_79825223 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Prompt managing storing in git v.s. db | Prompt managing storing in git v.s. db
We are building an LLM-based application that takes a lot of user data from various internal sources and sends the data to various prompts which provide the answers needed to fill out forms correctly.
The system used to be more basic, where a single LLM prompt would answer a ques... | https://stackoverflow.com/questions/79825223/prompt-managing-storing-in-git-v-s-db | python, architecture, artificial-intelligence, large-language-model | 1,763,624,523 |
se_78559183 | stackoverflow | ARTIFICIAL_INTELLIGENCE | What is the difference of AssistantAgent, ConversableAgent and UserProxyAgent of autogen? | What is the difference of AssistantAgent, ConversableAgent and UserProxyAgent of autogen?
I use the multiple agents from autogen https://microsoft.github.io/autogen/ .
There are at least three agents: AssistantAgent, ConversableAgent and UserProxyAgent.
What is the difference of AssistantAgent, ConversableAgent and U... | https://stackoverflow.com/questions/78559183/what-is-the-difference-of-assistantagent-conversableagent-and-userproxyagent-of | artificial-intelligence, large-language-model, agent, ms-autogen | 1,717,147,260 |
se_79534213 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Langgraph - human in the loop, graph within graph not working | Langgraph - human in the loop, graph within graph not working
I have two graph, the graph "collectInfoBuilder" is inside the graph "builder".
LLM used is Claude sonnet.
The workflow looks like:
collectInfoBuilder:
collectInfoBuilder = StateGraph(CollectInformationState)
collectInfoBuilder.add_node("create_analyst", c... | https://stackoverflow.com/questions/79534213/langgraph-human-in-the-loop-graph-within-graph-not-working | amazon-web-services, large-language-model, langgraph, claude | 1,742,918,264 |
se_79861318 | stackoverflow | ARTIFICIAL_INTELLIGENCE | DotNet in Arize for LLM Observability | DotNet in Arize for LLM Observability
I tried to implement a simple LLM observability using Arize.ai and dotnet using this code and even though I can get the results on my console but it does not reflect on the Arize trace page, what to do? I tried implementing in python it went smooth and after snooping through the o... | https://stackoverflow.com/questions/79861318/dotnet-in-arize-for-llm-observability | python, .net, large-language-model | 1,767,677,544 |
se_79860107 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Problems using local OLLAMA during embedding to ChromaDB | Problems using local OLLAMA during embedding to ChromaDB
I am running a Python script on a Linux VM without CUDA support and a local OLLAMA. When checking OLLAMA on the console with
ollama run jina/jina-embeddings-v2-base-de "Hello world"
the response is very fast. Takes less than 2 seconds.
When starting a script to... | https://stackoverflow.com/questions/79860107/problems-using-local-ollama-during-embedding-to-chromadb | python, large-language-model, embedding, ollama, chromadb | 1,767,524,459 |
se_78855296 | stackoverflow | ARTIFICIAL_INTELLIGENCE | text summarization with LLM Llama 3.1 8B Instruct | text summarization with LLM Llama 3.1 8B Instruct
I need to do abstractive text summarization with LLM Llama 3.1 8B Instruct. My question is how do I do this methodologically?
Here is how I propose going about it
Load CNN Daily dataset for text summarization with features (article and highlisths)
Load model and token... | https://stackoverflow.com/questions/78855296/text-summarization-with-llm-llama-3-1-8b-instruct | large-language-model, kaggle | 1,723,267,855 |
se_79852692 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to reorder Corpus+LLM chat bubbles in the correct order? | How to reorder Corpus+LLM chat bubbles in the correct order?
I'm writing a generative AI Corpus and AI Vocal Analysis tool that is for training peoples voice and giving feedback. I'm using qwen4b-instruct as an LLM and have prompted it really good however my pipeline goes like this. Corpus > Wiki Data > LLM with rerou... | https://stackoverflow.com/questions/79852692/how-to-reorder-corpusllm-chat-bubbles-in-the-correct-order | javascript, html, jquery, artificial-intelligence, large-language-model | 1,766,389,837 |
se_79851244 | stackoverflow | ARTIFICIAL_INTELLIGENCE | JsonOutputParser in LangChain raises OutputParserException when model includes conversational text | JsonOutputParser in LangChain raises OutputParserException when model includes conversational text
I am using LangChain to extract structured data from a user query using gpt-3.5-turbo. I have defined a Pydantic object and am passing the format instructions to the prompt.
However, occasionally the model returns text l... | https://stackoverflow.com/questions/79851244/jsonoutputparser-in-langchain-raises-outputparserexception-when-model-includes-c | python, openai-api, langchain, large-language-model | 1,766,159,459 |
se_79851377 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why does loading a Transformers pipeline appear slower when agent.invoke() is used inside a loop, while it loads quickly when there is no loop? | Why does loading a Transformers pipeline appear slower when agent.invoke() is used inside a loop, while it loads quickly when there is no loop?
I am trying to use a local LLM and langchain to create agents. I have observe that the loading time for the transformer pipeline differs in these two codes:
t1 = time.time()
p... | https://stackoverflow.com/questions/79851377/why-does-loading-a-transformers-pipeline-appear-slower-when-agent-invoke-is-us | pipeline, langchain, large-language-model | 1,766,171,102 |
se_79850771 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Creating Tool Calling Agents | Creating Tool Calling Agents
Are there any ways of creating llms/agents that are able to generate tool calling abilities like the tool_calls attribute in the AI Response of the Langchain framework when models like openai, claude, gemini are used? I hope to find a free solution that does not rely on paid providers, pre... | https://stackoverflow.com/questions/79850771/creating-tool-calling-agents | large-language-model, langchain-agents | 1,766,105,667 |
se_79840954 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Recommended way to create abstracted text embeddings from large text data? | Recommended way to create abstracted text embeddings from large text data?
I would like to use a LLM Encoder model to create vector embeddings for certain texts in my dataset. The texts are written as technical problem descriptions by experts who are trying to repair a hardware. The embeddings should then be used as a... | https://stackoverflow.com/questions/79840954/recommended-way-to-create-abstracted-text-embeddings-from-large-text-data | nlp, huggingface-transformers, large-language-model, summarization | 1,765,197,168 |
se_79847004 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Does the Gemini API expose its internal “context caching” representation, or is it strictly an opaque server-side cache? | Does the Gemini API expose its internal “context caching” representation, or is it strictly an opaque server-side cache?
I’m building a local-first agent/orchestration layer called QonQrete (open source) that runs everything sandboxed in a container on your own machine. In each “cycle” it builds memory and context fro... | https://stackoverflow.com/questions/79847004/does-the-gemini-api-expose-its-internal-context-caching-representation-or-is | caching, large-language-model, google-gemini, gemini-cli | 1,765,714,589 |
se_79845235 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to use SelfQueryRetriever in the recents versions of Langchain? | How to use SelfQueryRetriever in the recents versions of Langchain?
I'm trying to use metadata in RAG systems using LangChain. I see a lot of tutorials using SelfQueryRetriever, but it appears that this was deprecated in recent versions. Is this correct? I couldn't find anything when searching for 'SelfQueryRetriever'... | https://stackoverflow.com/questions/79845235/how-to-use-selfqueryretriever-in-the-recents-versions-of-langchain | langchain, large-language-model, rag, langgraph | 1,765,572,574 |
se_79843685 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can I standardize Amazon Bedrock model invocation parameters when each provider and model uses different request schemas? | How can I standardize Amazon Bedrock model invocation parameters when each provider and model uses different request schemas?
I’m building an internal LLM testing platform where users can select any Amazon Bedrock model and dynamically adjust its input parameters (e.g., max_tokens, temperature, top_p, embedding option... | https://stackoverflow.com/questions/79843685/how-can-i-standardize-amazon-bedrock-model-invocation-parameters-when-each-provi | amazon-web-services, aws-sdk, large-language-model, amazon-bedrock | 1,765,436,229 |
se_77879936 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to load precomputed embeddings to FAISS from langchain | How to load precomputed embeddings to FAISS from langchain
I am trying to read precomputed embeddings(i.e. simple vectors) into a FAISS vectorstore.
As seen in the github repo of FAISS I build an index like this and add vectors to it:
import faiss # make faiss available
index = faiss.IndexFlatL2(d) ... | https://stackoverflow.com/questions/77879936/how-to-load-precomputed-embeddings-to-faiss-from-langchain | python, langchain, large-language-model, faiss | 1,706,185,274 |
se_78552949 | stackoverflow | ARTIFICIAL_INTELLIGENCE | "Failed to get upload status for /mnt/data/*filename*" Issue downloading files generated by ChatGPT | "Failed to get upload status for /mnt/data/*filename*" Issue downloading files generated by ChatGPT
I'm working on a project where I need to extract employee information from an HTML file, save this data into a JSON file, and download employee images to a specific folder. I used ChatGPT to generate a Python ... | https://stackoverflow.com/questions/78552949/failed-to-get-upload-status-for-mnt-data-filename-issue-downloading-files-g | download, large-language-model, chat-gpt-4 | 1,717,045,614 |
se_77269117 | stackoverflow | ARTIFICIAL_INTELLIGENCE | langchain installtion issue: retrievers subpackge not installing, llms.bedrok does appear neither ConversationRetrievalChain from langchain.chains | langchain installtion issue: retrievers subpackge not installing, llms.bedrok does appear neither ConversationRetrievalChain from langchain.chains
After I install langchain with pip install I can not find the following sub-packages/objects:
retrievers subpackage not installing and directory langchain/retrievers not a... | https://stackoverflow.com/questions/77269117/langchain-installtion-issue-retrievers-subpackge-not-installing-llms-bedrok-do | python-3.x, langchain, large-language-model, amazon-kendra | 1,696,974,229 |
se_78471692 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to run a local Open Source LLM in llama-index in a restricted environment? | How to run a local Open Source LLM in llama-index in a restricted environment?
I have a question on how to best run a local LLM (all Open Source) with llama-index for a RAG in a relatively restricted environment (absolutely no API calls, no installing from external GitRepos and also no Ollama or vLLM - which basically... | https://stackoverflow.com/questions/78471692/how-to-run-a-local-open-source-llm-in-llama-index-in-a-restricted-environment | large-language-model, huggingface, llama-index, retrieval-augmented-generation | 1,715,596,863 |
se_79834752 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Repetitive generation on instruction tuning for raw language model | Repetitive generation on instruction tuning for raw language model
I have used the following code to do sft:
base_model = "google/gemma-3-270m"
it_model = "google/gemma-3-270m-it"
checkpoint_dir = "checkpoint"
learning_rate = 5e-5 #@param {type:"number"}
from datasets import Dataset
from transformers import pipeline
f... | https://stackoverflow.com/questions/79834752/repetitive-generation-on-instruction-tuning-for-raw-language-model | machine-learning, deep-learning, huggingface-transformers, large-language-model, fine-tuning | 1,764,588,837 |
se_78829403 | stackoverflow | ARTIFICIAL_INTELLIGENCE | LM Studio - Failed to load model | LM Studio - Failed to load model
I get this error message when loading the model in LM Studio 0.2.31:
Model: stable-diffusion-v1-5-pruned-emaonly-f32.gguf
Error:
"llama.cpp error: 'invalid model: tensor 'cond_stage_model.transformer.text_model.encoder.layers.0.layer_' is duplicated'"
json
{
"title": "Failed to load m... | https://stackoverflow.com/questions/78829403/lm-studio-failed-to-load-model | large-language-model, stable-diffusion, lm-studio | 1,722,707,877 |
se_79833972 | stackoverflow | ARTIFICIAL_INTELLIGENCE | PyTorch not recognizing RTX 5090 (sm_120) on Windows 11 – CUDA error: no kernel image available | PyTorch not recognizing RTX 5090 (sm_120) on Windows 11 – CUDA error: no kernel image available
I'm trying to use PyTorch with an NVIDIA GeForce RTX 5090 (Blackwell architecture, CUDA Compute Capability sm_120) on Windows 11, and I keep running into compatibility issues. PyTorch detects CUDA, but any GPU operation fai... | https://stackoverflow.com/questions/79833972/pytorch-not-recognizing-rtx-5090-sm-120-on-windows-11-cuda-error-no-kernel | python, pytorch, gpu, large-language-model | 1,764,513,813 |
se_79687721 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do AI Agent workflows (langgraph) know what tools to use? | How do AI Agent workflows (langgraph) know what tools to use?
Hi I'm currently trying to start to use langgraph and it's really awesome and incredible. I'm slightly confused on a certain subject though, how does langgraph identify tools?
How does it know what a tool does? How can I convey the purpose of the tool in or... | https://stackoverflow.com/questions/79687721/how-do-ai-agent-workflows-langgraph-know-what-tools-to-use | python, langchain, large-language-model, langgraph, crewai | 1,751,470,933 |
se_79527785 | stackoverflow | ARTIFICIAL_INTELLIGENCE | SFTTrainer Error : prepare_model_for_kbit_training() got an unexpected keyword argument 'gradient_checkpointing_kwargs' | SFTTrainer Error : prepare_model_for_kbit_training() got an unexpected keyword argument 'gradient_checkpointing_kwargs'
I'm trying to fine-tune a model using SFTTrainer from trl.
This is how my SFTConfig arguments look like,
from trl import SFTConfig
training_arguments = SFTConfig(
output_dir=output_dir... | https://stackoverflow.com/questions/79527785/sfttrainer-error-prepare-model-for-kbit-training-got-an-unexpected-keyword-a | python, nlp, large-language-model, transformer-model | 1,742,662,727 |
se_79829976 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to extract nested loop features from CUDA kernels for LLM-based optimization? | How to extract nested loop features from CUDA kernels for LLM-based optimization?
Question
I am working on an experimental project where I aim to have a large language model (LLM) automatically optimize CUDA kernels’ nested loops. The key requirement is to extract static loop and memory access features directly from C... | https://stackoverflow.com/questions/79829976/how-to-extract-nested-loop-features-from-cuda-kernels-for-llm-based-optimization | compiler-optimization, large-language-model, nvcc | 1,764,088,442 |
se_79825232 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Best method to manage metrics of prompts that are stored in a git repository | Best method to manage metrics of prompts that are stored in a git repository
We are building an LLM-based application which takes a lot of user data from various internal sources.
It then sends the data to various prompts which provide the answers needed to fill out forms correctly.
The prompts are being stored in the... | https://stackoverflow.com/questions/79825232/best-method-to-manage-metrics-of-prompts-that-are-stored-in-a-git-repository | python, architecture, artificial-intelligence, large-language-model | 1,763,624,956 |
se_79375332 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How does `llm.bind_tools` work in langchain? | How does `llm.bind_tools` work in langchain?
I need to understand how exactly does langchain convert information from code to LLM prompt, because end of the day, the LLM will need only text to be passed to it.
If I am incorrect somewhere in my understanding, kindly point it out as well when answering the question
This... | https://stackoverflow.com/questions/79375332/how-does-llm-bind-tools-work-in-langchain | nlp, openai-api, langchain, large-language-model, py-langchain | 1,737,479,739 |
se_79240222 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Gemini's excessively high token consumption issue | Gemini's excessively high token consumption issue
I only used the Gemini 1.5 Flash API and ran the following code. Although a single input doesn't exceed 400 tokens, the resulting invoice after a total of 700 requests doesn't match any of my calculations. Am I making a mistake somewhere? The code takes clips from ... | https://stackoverflow.com/questions/79240222/geminis-excessively-high-token-consumption-issue | image, large-language-model, google-gemini, google-generativeai | 1,732,990,058 |
se_79826779 | stackoverflow | ARTIFICIAL_INTELLIGENCE | My Code With Openrouter api is not working | My Code With Openrouter api is not working
I'm trying to automate intraday financial analysis using OpenRouter's free models. My Python script rotates through several LLM endpoints, sending a prompt about a stock's symbol, change, and closing price. If any model fails (API error, empty response, etc.), it tries the ne... | https://stackoverflow.com/questions/79826779/my-code-with-openrouter-api-is-not-working | python, artificial-intelligence, python-3.5, large-language-model, openrouter | 1,763,744,561 |
se_79817169 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Building Privacy-Compliant LLM Apps (e.g. Section 203 StGB) | Building Privacy-Compliant LLM Apps (e.g. Section 203 StGB)
I’m working on an app that leverages Large Language Models (LLMs) to assist professionals in regulated fields like medicine and law. My main concern is ensuring compliance with privacy and secrecy regulations (e.g., Section 203 StGB in Germany or similar).
1.... | https://stackoverflow.com/questions/79817169/building-privacy-compliant-llm-apps-e-g-section-203-stgb | amazon-web-services, azure, google-cloud-platform, cloud, large-language-model | 1,762,898,297 |
se_79789330 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can I make an MCP tool ask the LLM to request missing parameters instead of sending empty strings? | How can I make an MCP tool ask the LLM to request missing parameters instead of sending empty strings?
I'm building an MCP server (with spring ai 1.1.0-M3) that exposes a tool for searching contacts in my internal system.
Here’s a simplified version of the tool method:
public class myTool {
@McpTool(
name... | https://stackoverflow.com/questions/79789330/how-can-i-make-an-mcp-tool-ask-the-llm-to-request-missing-parameters-instead-of | large-language-model, model-context-protocol, spring-ai | 1,760,363,217 |
se_76864606 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Importing ConversationalRetrievalChain from langchain.chains isn't working | Importing ConversationalRetrievalChain from langchain.chains isn't working
I am trying to follow various tutorials on langchain and streamlit and I have encountered many problems regarding the names of imports. My main problem is that I can't seem to import ConversationalRetrievalChain from langchain.chains. This ... | https://stackoverflow.com/questions/76864606/importing-conversationalretrievalchain-from-langchain-chains-isnt-working | python, streamlit, openai-api, langchain, large-language-model | 1,691,555,679 |
se_79588071 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to let a tool return a picture when using langgraph/langchain? | How to let a tool return a picture when using langgraph/langchain?
I am using a LLM model which is capable of processing images.
When the LLM calls "get_screenshot" tool, I want to provide a screenshot of a website to it.
For example:
from langchain_core.tools import tool
def do_screenshoot_and_save_it_to_local_disk(... | https://stackoverflow.com/questions/79588071/how-to-let-a-tool-return-a-picture-when-using-langgraph-langchain | python, langchain, large-language-model, langgraph | 1,745,393,488 |
se_79815816 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Which LLMs can I run locally on RTX 1080 8GB with 48GB RAM? | Which LLMs can I run locally on RTX 1080 8GB with 48GB RAM?
I'm exploring options for running large language models locally on my workstation and would appreciate guidance on suitable models given my hardware constraints.
Hardware specifications:
CPU: Intel Core i7-9700K (8 cores, 3.6GHz)
GPU: NVIDIA RTX 1080 (8GB)
RA... | https://stackoverflow.com/questions/79815816/which-llms-can-i-run-locally-on-rtx-1080-8gb-with-48gb-ram | gpu, large-language-model, ollama, tooling-recommendation | 1,762,789,574 |
se_77058068 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why is my vector database retrieving irrelevant results? | Why is my vector database retrieving irrelevant results?
I'm trying to create a vector database in python using LangChain for retrieval augmentation with a large language model. Currently, I'm using NCBI Statpearls (a corpus of medical data) and for testing purposes have only initialized the vector database with a sin... | https://stackoverflow.com/questions/77058068/why-is-my-vector-database-retrieving-irrelevant-results | python, langchain, medical, large-language-model, vector-database | 1,694,076,960 |
se_79785472 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Installation error while installing GroundingDino | Installation error while installing GroundingDino
I am trying to install the GroundingDino as instructed in the README file of their official GitHub repo, but I am facing the error below:
Obtaining file:///home/kgupta/workspace/Synthetic_Data_gen/Annotation_Agent/models/GroundingDINO
Preparing metadata (setup.py) ..... | https://stackoverflow.com/questions/79785472/installation-error-while-installing-groundingdino | machine-learning, pytorch, neural-network, large-language-model | 1,759,928,025 |
se_79812421 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Getting an error while installing reasoning-gym library | Getting an error while installing reasoning-gym library
I am getting this error while downloading the Reasoning Gym library. How to resolve it?
Building wheels for collected packages: pycosat
Building wheel for pycosat (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pycosat (... | https://stackoverflow.com/questions/79812421/getting-an-error-while-installing-reasoning-gym-library | python, machine-learning, large-language-model | 1,762,523,904 |
se_79599290 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to parse LLM results from text to Json in n8n? | How to parse LLM results from text to Json in n8n?
I ask an LLM node something along the lines of
I want you to tell me a joke and return it as json: {"question1":, "answer1":, "question2":, "punchline":
It returns something like:
```json
{
"question1": "Why don't programmers like nature?",
"answer1": "It has... | https://stackoverflow.com/questions/79599290/how-to-parse-llm-results-from-text-to-json-in-n8n | json, large-language-model, n8n | 1,745,967,107 |
se_79228837 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Markdown with Code Blocks Appearing as Frontend UI Issue in ChatGPT Responses | Markdown with Code Blocks Appearing as Frontend UI Issue in ChatGPT Responses
I’m encountering a problem when using ChatGPT to generate Markdown that includes code blocks. Instead of returning proper Markdown output, the content appears to break and render as part of the frontend UI. This is particularly problematic w... | https://stackoverflow.com/questions/79228837/markdown-with-code-blocks-appearing-as-frontend-ui-issue-in-chatgpt-responses | markdown, prompt, large-language-model, chat-gpt-4 | 1,732,676,610 |
se_79811390 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Qwen 2.5 3B VLM Index error at the line trainer.train() | Qwen 2.5 3B VLM Index error at the line trainer.train()
I am trying to fine-tune Qwen 2.5 3B VLM on a chess piece dataset from hugging face.
Dataset: Trelis/chess_pieces
However, im getting this index errror at the final trainer line:
IndexError Traceback (most recent call last)
/tmp/i... | https://stackoverflow.com/questions/79811390/qwen-2-5-3b-vlm-index-error-at-the-line-trainer-train | python, large-language-model, index-error, fine-tuning, ollama | 1,762,439,418 |
se_79811128 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can I group transcribed phrases into meaningful chunks without using complex models? | How can I group transcribed phrases into meaningful chunks without using complex models?
I have a large set of phrases obtained via Azure Fast Transcription, and I need to group them into coherent semantic chunks (to use later in a RAG pipeline).
Initially, I tried grouping phrases based on speaker pauses (e.g., mergi... | https://stackoverflow.com/questions/79811128/how-can-i-group-transcribed-phrases-into-meaningful-chunks-without-using-complex | python, azure, large-language-model, rag, advice | 1,762,424,317 |
se_79806152 | stackoverflow | ARTIFICIAL_INTELLIGENCE | ModuleNotFoundError when importing ConversationBufferMemory and ConversationalRetrievalChain from LangChain | ModuleNotFoundError when importing ConversationBufferMemory and ConversationalRetrievalChain from LangChain
I'm trying to import ConversationBufferMemory and ConversationalRetrievalChain in my Python notebook as follows:
from langchain.memory import ConversationBufferMemory
from langchain.chains import ConversationalR... | https://stackoverflow.com/questions/79806152/modulenotfounderror-when-importing-conversationbuffermemory-and-conversationalre | python, artificial-intelligence, langchain, large-language-model, py-langchain | 1,761,939,624 |
se_79799930 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Redis- OpenAI not able to tune with actual radis text retrieved from vector index | Redis- OpenAI not able to tune with actual radis text retrieved from vector index
I am trying to create a simple vector index for conversation AI application where i want to use radis as long-term memory.
i configured radis locally and created the index which ideally stores
"user_id"
"text"
"timestmap"
"embedding"
bel... | https://stackoverflow.com/questions/79799930/redis-openai-not-able-to-tune-with-actual-radis-text-retrieved-from-vector-inde | redis, openai-api, large-language-model, vector-database, langgraph | 1,761,469,378 |
se_76908678 | stackoverflow | ARTIFICIAL_INTELLIGENCE | what is the difference between llm and llm chain in langchain? | what is the difference between llm and llm chain in langchain?
this is llm:
question=st.text_input("your question")
llm=OpenAI(temperature=0.9)
if prompt:
response=llm(prompt)
st.write(response)
then if we need to execute a prompt we have to crate llm chain:
from langchain.prompts import PromptTemplate
from l... | https://stackoverflow.com/questions/76908678/what-is-the-difference-between-llm-and-llm-chain-in-langchain | python, streamlit, openai-api, langchain, large-language-model | 1,692,127,952 |
se_79804815 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Text-to-Speech function in a 3D Unity game | Text-to-Speech function in a 3D Unity game
I am doing a 3D game using a Unity, and I need my NPC can communicate with the players with voice
I want my NPC can speak with a voice that response is generated by the LLM, so the response will always be different. I need a function is for the NPC can speeching by voice by t... | https://stackoverflow.com/questions/79804815/text-to-speech-function-in-a-3d-unity-game | unity-game-engine, game-development, text-to-speech, large-language-model, advice | 1,761,831,037 |
se_79804054 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Langchain RAG is not retrieving any document | Langchain RAG is not retrieving any document
This is my embedding code, which I run once only:
embeddings = OpenAIEmbeddings(model="text-embedding-3-large")
vector_store = MongoDBAtlasVectorSearch.from_connection_string(
connection_string = DB_CONNECTION,
namespace = "gpt.embeddings",
embedding = embeddings,
... | https://stackoverflow.com/questions/79804054/langchain-rag-is-not-retrieving-any-document | python, langchain, large-language-model, rag | 1,761,757,253 |
se_77778146 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How can I leverage LLMs to refine and clean text without additional comments? | How can I leverage LLMs to refine and clean text without additional comments?
I am trying to get ChatGPT 3.5 to refine a dataset I have extracted from PDF files. The dataset will act as a knowledge base for an RAG system.
The initial tests show great improvement, except for the bot returning the answer with a comment ... | https://stackoverflow.com/questions/77778146/how-can-i-leverage-llms-to-refine-and-clean-text-without-additional-comments | nlp, data-cleaning, large-language-model, retrieval-augmented-generation | 1,704,704,379 |
se_79802971 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Does SGLang’s OpenAI-compatible API support async/await non-streaming calls? | Does SGLang’s OpenAI-compatible API support async/await non-streaming calls?
I’m using SGLang’s OpenAI-compatible server (e.g., --port 30000, /v1/chat/completions) and calling it via the openai SDK with an async client:
from openai import AsyncOpenAI
client = AsyncOpenAI(api_key="…", base_url="http://localhost:30000/v... | https://stackoverflow.com/questions/79802971/does-sglang-s-openai-compatible-api-support-async-await-non-streaming-calls | large-language-model, inference, inference-engine, sglang | 1,761,663,967 |
se_76451205 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Difference between Instruction Tuning vs Non Instruction Tuning Large Language Models | Difference between Instruction Tuning vs Non Instruction Tuning Large Language Models
What is the difference between instruction tuning and normal fine-tuning for large language models?
Also the instruction-tuning I'm referring to isn't the in-context/prompt one.
All the recent papers about fine-tuning seem to be abou... | https://stackoverflow.com/questions/76451205/difference-between-instruction-tuning-vs-non-instruction-tuning-large-language-m | language-model, fine-tuning, large-language-model | 1,686,497,828 |
se_79799225 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Does setting torch_dtype=torch.float16 override 8-bit quantization in BitsAndBytes? | Does setting torch_dtype=torch.float16 override 8-bit quantization in BitsAndBytes?
I'm trying to run the Qwen2.5-Coder-3B model locally with 8-bit quantization using BitsAndBytes.
While loading the model, I noticed that some examples also specify torch_dtype=torch.float16.
From my understanding, torch_dtype mainly af... | https://stackoverflow.com/questions/79799225/does-setting-torch-dtype-torch-float16-override-8-bit-quantization-in-bitsandbyt | python, torch, large-language-model | 1,761,346,021 |
se_79796709 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why does botocore raise ValidationException with pydantic BaseModel output constraint on variable length output types? | Why does botocore raise ValidationException with pydantic BaseModel output constraint on variable length output types?
I am using pydantic AI and use pydantic BaseModel to set the output_type of the answer. From time to time I encounter a ValidationException. I cannot accurately pinpoint the issue creating this phenom... | https://stackoverflow.com/questions/79796709/why-does-botocore-raise-validationexception-with-pydantic-basemodel-output-const | python, pydantic, large-language-model, amazon-bedrock | 1,761,132,547 |
se_79209753 | stackoverflow | ARTIFICIAL_INTELLIGENCE | llama-index RAG: how to display retrieved context? | llama-index RAG: how to display retrieved context?
I am using LlamaIndex to perform retrieval-augmented generation (RAG).
Currently, I can retrieve and answer questions using the following minimal 5 line example, from https://docs.llamaindex.ai/en/stable/getting_started/starter_example/:
from llama_index import Vector... | https://stackoverflow.com/questions/79209753/llama-index-rag-how-to-display-retrieved-context | python, large-language-model, llama-index, rag | 1,732,166,151 |
se_79795624 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Torch example transformer with TransformerDecoder | Torch example transformer with TransformerDecoder
In the torch example provided here https://github.com/pytorch/examples/tree/main/word_language_model, tansformer only uses torch.TransformerEncoder and torch.TransformerDecoder is overwritten with a simple Linear layer. I wanted to implement torch's Decoder in my code ... | https://stackoverflow.com/questions/79795624/torch-example-transformer-with-transformerdecoder | pytorch, nlp, large-language-model, transformer-model | 1,761,036,534 |
se_79794171 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How do I get a conversation going with a MistralAI Agent using LangChain? | How do I get a conversation going with a MistralAI Agent using LangChain?
I am learning how to make Agents using MistralAI and LangChain. I have been following the official documentation from LangChain but I got stuck at when I was calling the LLM for the second time.
I tried to call the LLM for the second time in the... | https://stackoverflow.com/questions/79794171/how-do-i-get-a-conversation-going-with-a-mistralai-agent-using-langchain | langchain, large-language-model, langchain-agents, mistral-ai | 1,760,862,856 |
se_79791017 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Cannot get token logprobs while using langchain structured output | Cannot get token logprobs while using langchain structured output
I am using langchain to call an LLM and I want to get the logprobs for each token.
I want to get them after doing this:
from langchain_openai import ChatOpenAI
from pydantic import BaseModel
class ResponseFormat(BaseModel):
question_index: int
... | https://stackoverflow.com/questions/79791017/cannot-get-token-logprobs-while-using-langchain-structured-output | python, openai-api, langchain, large-language-model, litellm | 1,760,521,989 |
se_79790480 | stackoverflow | ARTIFICIAL_INTELLIGENCE | MLXLMCommon in Swift gives error when loading model: noModelFactoryAvailable | MLXLMCommon in Swift gives error when loading model: noModelFactoryAvailable
I am following the tutorial here:
https://github.com/ml-explore/mlx-swift-examples/tree/main/Libraries/MLXLMCommon
import MLXLMCommon
Task {
do {
print("Loading model...")
let model = try await loadModel(id: "mlx... | https://stackoverflow.com/questions/79790480/mlxlmcommon-in-swift-gives-error-when-loading-model-nomodelfactoryavailable | ios, swift, large-language-model, mlx | 1,760,464,870 |
se_79789695 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Firebase Genkit using prompt in chat | Firebase Genkit using prompt in chat
I am using chat with genKit library like below:
const session = agenticAi.createSession<any>({
initialState: {
uid: uid,
},
});
const chat = session.chat({
model: googleAI.model('gemini-2.5-flash'),
tools: [getUserProfile, getFinanceData],
maxTurns: 1,
system: `To ... | https://stackoverflow.com/questions/79789695/firebase-genkit-using-prompt-in-chat | node.js, firebase, large-language-model, firebase-genkit | 1,760,397,727 |
se_79789149 | stackoverflow | ARTIFICIAL_INTELLIGENCE | AgentDojo repo on Github: I can't reproduce the table results, because the Security results are always 0.00% | AgentDojo repo on Github: I can't reproduce the table results, because the Security results are always 0.00%
I tried running this command with GPT_4O_MINI_2024_07_18, so that the rate limits wouldn't block the execution before the results are printed
python -m agentdojo.scripts.benchmark -s workspace -ut user_task... | https://stackoverflow.com/questions/79789149/agentdojo-repo-on-github-i-cant-reproduce-the-table-results-because-the-secur | python, large-language-model | 1,760,350,126 |
se_77830255 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Enable GPU for Python programming with VS Code on Windows 10 (llama-cpp-python) | Enable GPU for Python programming with VS Code on Windows 10 (llama-cpp-python)
I struggled alot while enabling GPU on my 32GB Windows 10 machine with 4GB Nvidia P100 GPU during Python programming. My LLMs did not use the GPU of my machine while inferencing. After spending few days on this I thought I will summarize m... | https://stackoverflow.com/questions/77830255/enable-gpu-for-python-programming-with-vs-code-on-windows-10-llama-cpp-python | python, visual-studio-code, gpu, large-language-model, llama-cpp-python | 1,705,471,390 |
se_78927508 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to keep updated information in a RAG system? | How to keep updated information in a RAG system?
I have created a RAG system with documents I have (saved in chunks). I was wondering how to keep updated information in responses.
For example, I have news articles about one subject. Those articles may add new information over time but also can correct outdated informa... | https://stackoverflow.com/questions/78927508/how-to-keep-updated-information-in-a-rag-system | large-language-model, rag | 1,724,930,336 |
se_78697835 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Deepspeed : AttributeError: 'DummyOptim' object has no attribute 'step' | Deepspeed : AttributeError: 'DummyOptim' object has no attribute 'step'
I want to use deepspeed for training LLMs along with Huggingface Trainer. But when I use deepspeed along with trainer I get error "AttributeError: 'DummyOptim' object has no attribute 'step'". Below is my code
import argparse
impo... | https://stackoverflow.com/questions/78697835/deepspeed-attributeerror-dummyoptim-object-has-no-attribute-step | python, huggingface-transformers, large-language-model, huggingface-trainer, deepspeed | 1,719,932,013 |
se_79754802 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to enforce Claude to respond with either text or tool_use, but not both at the same time? | How to enforce Claude to respond with either text or tool_use, but not both at the same time?
I’m already familiar with the different options for the tool_choice parameter (auto, tool, any, none). That’s not what my question is about.
I always let Claude decide whether to use a tool, and if so, which one. What I expec... | https://stackoverflow.com/questions/79754802/how-to-enforce-claude-to-respond-with-either-text-or-tool-use-but-not-both-at-t | large-language-model, claude | 1,756,912,990 |
se_79785704 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Getting "FATAL FIPS SELFTEST FAILURE" when importing qwen-vl-utils | Getting "FATAL FIPS SELFTEST FAILURE" when importing qwen-vl-utils
When I run
from qwen_vl_utils import process_vision_info
in my Python environment, I get
crypto/fips/fips.c:154: OpenSSL internal error: FATAL FIPS SELFTEST FAILURE
Aborted
I'm using
OpenSSL 3.3.2
Python 3.10
qwen-vl-utils 0.0.14 (Installed... | https://stackoverflow.com/questions/79785704/getting-fatal-fips-selftest-failure-when-importing-qwen-vl-utils | pip, openssl, conda, large-language-model | 1,759,943,292 |
se_78873304 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to sample multiple completions (n) directly from Claude API without a for loop | How to sample multiple completions (n) directly from Claude API without a for loop
I'm using the Anthropic Claude API and I'm trying to generate multiple completions (n completions) for a given prompt in a single API call. OpenAI's API provides an n parameter in their sampling settings to achieve this, but I can't fin... | https://stackoverflow.com/questions/78873304/how-to-sample-multiple-completions-n-directly-from-claude-api-without-a-for-lo | python, machine-learning, nlp, large-language-model, claude | 1,723,682,273 |
se_78953580 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why do I get a TypeException when running Claude API in parallel? | Why do I get a TypeException when running Claude API in parallel?
I successfully ran OpenAI GPT4o in parallel with multiprocessing:
def llm_query(chunk):
context, query = get_prompt_synonyms()
input1, output1 = get_example()
response = client.chat.completions.create(
model="gpt-4o",
message... | https://stackoverflow.com/questions/78953580/why-do-i-get-a-typeexception-when-running-claude-api-in-parallel | python, parallel-processing, multiprocessing, large-language-model, claude | 1,725,546,852 |
se_79782221 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Error while deploying, but not in local: "crewai Failed to upsert documents: "Expected IDs to be unique, found 28 Duplicate IDs" | Error while deploying, but not in local: "crewai Failed to upsert documents: "Expected IDs to be unique, found 28 Duplicate IDs"
When I initialize a Crew in Azure, I get an error:
crewai Failed to upsert documents: "Expected IDs to be unique, found 28 Duplicate IDs"
followed by lots of uuids.
from cre... | https://stackoverflow.com/questions/79782221/error-while-deploying-but-not-in-local-crewai-failed-to-upsert-documents-ex | python, large-language-model, agent, crewai | 1,759,533,359 |
se_79782309 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to reduce latency in a context-aware chatbot with chart + dataset inputs | How to reduce latency in a context-aware chatbot with chart + dataset inputs
I’m building a chatbot for my research project that helps participants understand a chart. The chatbot runs on a website built with React.
My goal is to make it feel just like using ChatGPT in the browser: users upload a chart image and datas... | https://stackoverflow.com/questions/79782309/how-to-reduce-latency-in-a-context-aware-chatbot-with-chart-dataset-inputs | chatbot, openai-api, prompt, large-language-model, chatgpt-api | 1,759,553,818 |
se_79780103 | stackoverflow | ARTIFICIAL_INTELLIGENCE | What does total_token_count means from gemini response? | What does total_token_count means from gemini response?
I'm trying to understand how total_token_count is calculated for the gemini-2.5-flash model.
The official documentation suggests total_token_count = prompt_token_count + candidates_token_count, but my API responses show a significant discrepancy. Furthermore, the... | https://stackoverflow.com/questions/79780103/what-does-total-token-count-means-from-gemini-response | google-cloud-platform, large-language-model, google-gemini | 1,759,324,274 |
se_79778613 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to reconstruct sentences from mean-pooled embeddings (embedding inversion) | How to reconstruct sentences from mean-pooled embeddings (embedding inversion)
I’m working on a research problem where I want to reconstruct or paraphrase sentences starting from synthetic embeddings.
The embeddings are global (mean-pooled), not token-level, so they lose structural and syntactic information.
The goal ... | https://stackoverflow.com/questions/79778613/how-to-reconstruct-sentences-from-mean-pooled-embeddings-embedding-inversion | nlp, large-language-model, embedding, decoder, encoder-decoder | 1,759,190,522 |
se_79767548 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to stream LLM responses in a Shiny app instead of waiting for full output? | How to stream LLM responses in a Shiny app instead of waiting for full output?
I am creating a Shiny app in R. One of its features is to display processed text within the app, and then allow the user to click a button to send that text to an LLM (Large Language Model).
The tricky problem I’m facing is: the LLM’s respo... | https://stackoverflow.com/questions/79767548/how-to-stream-llm-responses-in-a-shiny-app-instead-of-waiting-for-full-output | r, shiny, large-language-model | 1,758,123,714 |
se_79686587 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Transformers.js pipeline error with React useState: "text.split is not a function" | Transformers.js pipeline error with React useState: "text.split is not a function"
I am trying to use transformers.js to build a simple chatbot to answer questions related to my resume. The error is as below:
TypeError: text.split is not a function
at closure._encode_text (tokenizers.js:2840:1)
at cl... | https://stackoverflow.com/questions/79686587/transformers-js-pipeline-error-with-react-usestate-text-split-is-not-a-functio | javascript, reactjs, react-hooks, huggingface-transformers, large-language-model | 1,751,402,858 |
se_79771777 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Schema Guided Reasoning to dynamically force LLM to select one of the values from list | Schema Guided Reasoning to dynamically force LLM to select one of the values from list
I am trying to use a Schema Guided Reasoning approach to develop a system which will classify for me product into one of the categories from predefined list based on its name\description. For that I use pydantic standup as follows:
... | https://stackoverflow.com/questions/79771777/schema-guided-reasoning-to-dynamically-force-llm-to-select-one-of-the-values-fro | openai-api, pydantic, large-language-model, typing | 1,758,553,700 |
se_79773405 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to solve device mismatch issue when using offloading with QwenImageEditPlus pipeline and GGUF weights | How to solve device mismatch issue when using offloading with QwenImageEditPlus pipeline and GGUF weights
After failing to make the QwenImageEditPlus run (https://huggingface.co/spaces/discord-community/README/discussions/9#68d260e32053323e6bfab30c), I tried a different approach (thanks to all the example codes availa... | https://stackoverflow.com/questions/79773405/how-to-solve-device-mismatch-issue-when-using-offloading-with-qwenimageeditplus | huggingface-transformers, large-language-model, huggingface, diffusers | 1,758,699,367 |
se_76800382 | stackoverflow | ARTIFICIAL_INTELLIGENCE | OpenAI from Langchain requires "openai_api_key" even though it is loaded | OpenAI from Langchain requires "openai_api_key" even though it is loaded
this is my code:
import os
from dotenv import load_dotenv,find_dotenv
load_dotenv(find_dotenv())
print(os.environ.get("OPEN_AI_KEY"))
from langchain.llms import OpenAI
llm=OpenAI(model_name="text-davinci-003",temperature=0.7,max_token... | https://stackoverflow.com/questions/76800382/openai-from-langchain-requires-openai-api-key-even-though-it-is-loaded | python, python-3.x, openai-api, langchain, large-language-model | 1,690,771,130 |
se_79556268 | stackoverflow | ARTIFICIAL_INTELLIGENCE | MCP Python SDK. How to authorise a client with Bearer header with SSE? | MCP Python SDK. How to authorise a client with Bearer header with SSE?
I am building the MCP server application to connect some services to LLM . I use the MCP Python SDK https://github.com/modelcontextprotocol/python-sdk
One of things i want to implement is authorisation of a user with the token.
I see it must be po... | https://stackoverflow.com/questions/79556268/mcp-python-sdk-how-to-authorise-a-client-with-bearer-header-with-sse | python, fastapi, large-language-model | 1,743,801,478 |
se_78389427 | stackoverflow | ARTIFICIAL_INTELLIGENCE | How to generate Multiple Responses for single prompt with Google Gemini API? | How to generate Multiple Responses for single prompt with Google Gemini API?
Context
I am using google gemini-api.
Using their Python SDK
Goal
I am trying to generate multiple possible responses for a single prompt according to the docs and API-reference
Expected result - multiple response for a single prompt
Actual... | https://stackoverflow.com/questions/78389427/how-to-generate-multiple-responses-for-single-prompt-with-google-gemini-api | python, large-language-model, google-gemini | 1,714,122,981 |
se_79769295 | stackoverflow | ARTIFICIAL_INTELLIGENCE | AttributeError: 'DynamicCache' object has no attribute 'seen_tokens' | AttributeError: 'DynamicCache' object has no attribute 'seen_tokens'
I'm following the Hands-On Large Language Models book to learn more about LLMs. I'm trying to generate text using the "microsoft/Phi-3-mini-4k-instruct" model which is used in the book. Somehow I get an error while trying the example ... | https://stackoverflow.com/questions/79769295/attributeerror-dynamiccache-object-has-no-attribute-seen-tokens | python, large-language-model, transformer-model | 1,758,271,198 |
se_79764717 | stackoverflow | ARTIFICIAL_INTELLIGENCE | Why does hugging face trainer still recognize different device between my encoder & classifier head even after I manually map it on the same device | Why does hugging face trainer still recognize different device between my encoder & classifier head even after I manually map it on the same device
I encounterd this error while trying to run hugging face trainer on a multi-gpu.
RuntimeError: Expected all tensors to be on the same device, but found at least two de... | https://stackoverflow.com/questions/79764717/why-does-hugging-face-trainer-still-recognize-different-device-between-my-encode | pytorch, large-language-model, huggingface, multi-gpu, huggingface-trainer | 1,757,907,918 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.