I'm a basic program that prints the famous "Hello, world!" message to the console.
```
### Multimodal models
```
ollama run llava "What's in this image? /Users/jmorgan/Desktop/smile.png"
The image features a yellow smiley face, which is likely the central focus of the picture.
```
### Pass the prompt as an argument
```
$ ollama run llama3.2 "Summarize this file: $(cat README.md)"
Ollama is a lightweight, extensible framework for building and running language models on the local machine. It provides a simple API for creating, running, and managing models, as well as a library of pre-built models that can be easily used in a variety of applications.
-[IntelliBar](https://intellibar.app/)(AI-powered assistant for macOS)
-[QA-Pilot](https://github.com/reid41/QA-Pilot)(Interactive chat tool that can leverage Ollama models for rapid understanding and navigation of GitHub code repositories)
-[ChatOllama](https://github.com/sugarforever/chat-ollama)(Open Source Chatbot based on Ollama with Knowledge Bases)
-[CRAG Ollama Chat](https://github.com/Nagi-ovo/CRAG-Ollama-Chat)(Simple Web Search with Corrective RAG)
-[RAGFlow](https://github.com/infiniflow/ragflow)(Open-source Retrieval-Augmented Generation engine based on deep document understanding)
-[Local Multimodal AI Chat](https://github.com/Leon-Sander/Local-Multimodal-AI-Chat)(Ollama-based LLM Chat with support for multiple features, including PDF RAG, voice chat, image-based interactions, and integration with OpenAI.)
-[ARGO](https://github.com/xark-argo/argo)(Locally download and run Ollama and Huggingface models with RAG on Mac/Windows/Linux)
-[OrionChat](https://github.com/EliasPereirah/OrionChat) - OrionChat is a web interface for chatting with different AI providers
-[G1](https://github.com/bklieger-groq/g1)(Prototype of using prompting strategies to improve the LLM's reasoning through o1-like reasoning chains.)
-[Perfect Memory AI](https://www.perfectmemory.ai/)(Productivity AI assists personalized by what you have seen on your screen, heard and said in the meetings)
-[Hexabot](https://github.com/hexastack/hexabot)(A conversational AI builder)
-[Reddit Rate](https://github.com/rapidarchitect/reddit_analyzer)(Search and Rate Reddit topics with a weighted summation)
-[OpenTalkGpt](https://github.com/adarshM84/OpenTalkGpt)(Chrome Extension to manage open-source models supported by Ollama, create custom models, and chat with models from a user-friendly UI)
-[VT](https://github.com/vinhnx/vt.ai)(A minimal multimodal AI chat app, with dynamic conversation routing. Supports local models via Ollama)
-[Nosia](https://github.com/nosia-ai/nosia)(Easy to install and use RAG platform based on Ollama)
-[Witsy](https://github.com/nbonamy/witsy)(An AI Desktop application available for Mac/Windows/Linux)
-[Abbey](https://github.com/US-Artificial-Intelligence/abbey)(A configurable AI interface server with notebooks, document storage, and YouTube support)
-[Minima](https://github.com/dmayboroda/minima)(RAG with on-premises or fully local workflow)
-[aidful-ollama-model-delete](https://github.com/AidfulAI/aidful-ollama-model-delete)(User interface for simplified model cleanup)
-[Perplexica](https://github.com/ItzCrazyKns/Perplexica)(An AI-powered search engine & an open-source alternative to Perplexity AI)
-[Ollama Mixture of Experts (MOE) in 50 lines of code](https://github.com/rapidarchitect/ollama_moe)
-[vim-intelligence-bridge](https://github.com/pepo-ec/vim-intelligence-bridge) Simple interaction of "Ollama" with the Vim editor
-[x-cmd ollama](https://x-cmd.com/mod/ollama)
-[bb7](https://github.com/drunkwcodes/bb7)
-[SwollamaCLI](https://github.com/marcusziade/Swollama) bundled with the Swollama Swift package. [Demo](https://github.com/marcusziade/Swollama?tab=readme-ov-file#cli-usage)
-[aichat](https://github.com/sigoden/aichat) All-in-one LLM CLI tool featuring Shell Assistant, Chat-REPL, RAG, AI tools & agents, with access to OpenAI, Claude, Gemini, Ollama, Groq, and more.
-[PowershAI](https://github.com/rrg92/powershai) PowerShell module that brings AI to terminal on Windows, including support for Ollama
-[orbiton](https://github.com/xyproto/orbiton) Configuration-free text editor and IDE with support for tab completion with Ollama.
-[pgai](https://github.com/timescale/pgai) - PostgreSQL as a vector database (Create and search embeddings from Ollama models using pgvector)
-[Get started guide](https://github.com/timescale/pgai/blob/main/docs/vectorizer-quick-start.md)
-[MindsDB](https://github.com/mindsdb/mindsdb/blob/staging/mindsdb/integrations/handlers/ollama_handler/README.md)(Connects Ollama models with nearly 200 data platforms and apps)
-[chromem-go](https://github.com/philippgille/chromem-go/blob/v0.5.0/embed_ollama.go) with [example](https://github.com/philippgille/chromem-go/tree/v0.5.0/examples/rag-wikipedia-ollama)
-[Kangaroo](https://github.com/dbkangaroo/kangaroo)(AI-powered SQL client and admin tool for popular databases)
-[LangChain](https://python.langchain.com/docs/integrations/llms/ollama) and [LangChain.js](https://js.langchain.com/docs/integrations/chat/ollama/) with [example](https://js.langchain.com/docs/tutorials/local_rag/)
-[Yacana](https://remembersoftwares.github.io/yacana/)(User-friendly multi-agent framework for brainstorming and executing predetermined flows with built-in tool integration)
-[Spring AI](https://github.com/spring-projects/spring-ai) with [reference](https://docs.spring.io/spring-ai/reference/api/chat/ollama-chat.html) and [example](https://github.com/tzolov/ollama-tools)
-[LangChainGo](https://github.com/tmc/langchaingo/) with [example](https://github.com/tmc/langchaingo/tree/main/examples/ollama-completion-example)
-[LangChain4j](https://github.com/langchain4j/langchain4j) with [example](https://github.com/langchain4j/langchain4j-examples/tree/main/ollama-examples/src/main/java)
-[LangChainRust](https://github.com/Abraxas-365/langchain-rust) with [example](https://github.com/Abraxas-365/langchain-rust/blob/main/examples/llm_ollama.rs)
-[LangChain for .NET](https://github.com/tryAGI/LangChain) with [example](https://github.com/tryAGI/LangChain/blob/main/examples/LangChain.Samples.OpenAI/Program.cs)
-[LlamaIndex](https://docs.llamaindex.ai/en/stable/examples/llm/ollama/) and [LlamaIndexTS](https://ts.llamaindex.ai/modules/llms/available_llms/ollama)
-[LiteLLM](https://github.com/BerriAI/litellm)
-[OllamaFarm for Go](https://github.com/presbrey/ollamafarm)
-[OllamaSharp for .NET](https://github.com/awaescher/OllamaSharp)
-[Ollama for Ruby](https://github.com/gbaptista/ollama-ai)
-[Ollama-rs for Rust](https://github.com/pepperoni21/ollama-rs)
-[Ollama-hpp for C++](https://github.com/jmont-dev/ollama-hpp)
-[Ollama4j for Java](https://github.com/ollama4j/ollama4j)
-[PromptingTools.jl](https://github.com/svilupp/PromptingTools.jl) with an [example](https://svilupp.github.io/PromptingTools.jl/dev/examples/working_with_ollama)
-[Agents-Flex for Java](https://github.com/agents-flex/agents-flex) with [example](https://github.com/agents-flex/agents-flex/tree/main/agents-flex-llm/agents-flex-llm-ollama/src/test/java/com/agentsflex/llm/ollama)
-[Parakeet](https://github.com/parakeet-nest/parakeet) is a GoLang library, made to simplify the development of small generative AI applications with Ollama.
-[Haverscript](https://github.com/andygill/haverscript) with [examples](https://github.com/andygill/haverscript/tree/main/examples)
-[Ollama for Swift](https://github.com/mattt/ollama-swift)
-[Swollama for Swift](https://github.com/marcusziade/Swollama) with [DocC](https://marcusziade.github.io/Swollama/documentation/swollama/)
-[GoLamify](https://github.com/prasad89/golamify)
-[Ollama for Haskell](https://github.com/tusharad/ollama-haskell)
-[multi-llm-ts](https://github.com/nbonamy/multi-llm-ts)(A Typescript/JavaScript library allowing access to different LLM in unified API)
-[Plasmoid Ollama Control](https://github.com/imoize/plasmoid-ollamacontrol)(KDE Plasma extension that allows you to quickly manage/control Ollama model)
-[AI Telegram Bot](https://github.com/tusharhero/aitelegrambot)(Telegram bot using Ollama in backend)
-[AI ST Completion](https://github.com/yaroslavyaroslav/OpenAI-sublime-text)(Sublime Text 4 AI assistant plugin with Ollama support)
-[ChatGPTBox: All in one browser extension](https://github.com/josStorer/chatGPTBox) with [Integrating Tutorial](https://github.com/josStorer/chatGPTBox/issues/616#issuecomment-1975186467)
-[Discord AI chat/moderation bot](https://github.com/rapmd73/Companion) Chat/moderation bot written in python. Uses Ollama to create personalities.
-[Headless Ollama](https://github.com/nischalj10/headless-ollama)(Scripts to automatically install ollama client & models on any OS for apps that depends on ollama server)
-[Terraform AWS Ollama & Open WebUI](https://github.com/xuyangbocn/terraform-aws-self-host-llm)(A Terraform module to deploy on AWS a ready-to-use Ollama service, together with its front end Open WebUI service.)
-[Local AI Helper](https://github.com/ivostoykov/localAI)(Chrome and Firefox extensions that enable interactions with the active tab and customisable API endpoints. Includes secure storage for user prompts.)
-[vnc-lm](https://github.com/jake83741/vnc-lm)(Discord bot for messaging with LLMs through Ollama and LiteLLM. Seamlessly move between local and flagship models.)
-[LSP-AI](https://github.com/SilasMarvin/lsp-ai)(Open-source language server for AI-powered functionality)
-[QodeAssist](https://github.com/Palm1r/QodeAssist)(AI-powered coding assistant plugin for Qt Creator)
-[TextLLaMA](https://github.com/adarshM84/TextLLaMA) A Chrome Extension that helps you write emails, correct grammar, and translate into any language
### Supported backends
-[llama.cpp](https://github.com/ggerganov/llama.cpp) project founded by Georgi Gerganov.
注意:每次运行前请检查环境变量`HSA_OVERRIDE_GFX_VERSION`是否正确设置。
### Observability
## 参考资料
-[OpenLIT](https://github.com/openlit/openlit) is an OpenTelemetry-native tool for monitoring Ollama Applications & GPUs using traces and metrics.
* https://github.com/ollama/ollama
-[HoneyHive](https://docs.honeyhive.ai/integrations/ollama) is an AI observability and evaluation platform for AI agents. Use HoneyHive to evaluate agent performance, interrogate failures, and monitor quality in production.
if(ggml_cuda_info().devices[id].cc<GGML_CUDA_CC_CDNA||ggml_cuda_info().devices[id].cc==GGML_CUDA_CC_RDNA1){// NVIDIA and AMD older than RDNA2 but not CDNA
if(ggml_cuda_info().devices[id].cc<1001030){// NVIDIA and AMD older than RDNA2 but not CDNA