Deploying a local LLM: How do you choose between Ollama, LM Studio, llama.cpp and vLLM?

February 24, 2025

On January 20, 2025, DeepSeek released R1 along with six smaller models trained on R1's answers. The smallest had just 1.5B parameters (about 1.5 billion). 1 I remember how popular local deployment became when R1 arrived. I wanted to see how large a model my computer could run and started investigating. First I watched a tutorial running R1 with Ollama. My later searches grew more specific: “run r1 32b on 7900xtx” and “how to run 3 simultaneous requests in ollama.” 2

Which of the four tools should I choose?

While comparing vLLM and Ollama, I read 柏企's Chinese version on Zhihu. 3 In allglenn's English original, one Python line read output = llm.generate("What is VLLM?"). 4 It passes a question straight to the model. With 100 comments to summarize individually, Python can turn each into a prompt and pass the whole list to llm.generate(prompts). vLLM batches them automatically, without starting a chat server. This is offline batch inference. 5

What matters to meOllama6LM Studio7llama.cpp8vLLM9
When to choose it firstRun a model in one command for local scriptsSelect models, switch versions and chat using a mouseControl exactly how a model file runsShare a GPU service or batch-process text in Python
Can I chat immediately?Chat in the terminal, or add Open WebUI for browser chatDesktop app includes model search, download and chatStart llama-server for a browser chat pageStart an API service and chat through a client
How do I install a model?Pull by model name, or import an existing GGUF with a Modelfile (Ollama's model configuration file)10Select GGUF in the app. Apple silicon Macs can also use MLX versions.Specify a local .gguf directly, or download from Hugging FaceUsually a Hugging Face repository name or local model directory. GGUF support is still experimental.11
Will my computer work?CPU supported. GPU acceleration depends on model, including Apple silicon and specified NVIDIA/AMD GPUs.12Start with the desktop app on Windows, Linux or an Apple silicon Mac.7CPU or backends such as Metal, CUDA and Vulkan. Some layers can be offloaded to a GPU.Typically a supported Linux GPU server. CUDA, ROCm and CPU have separate installation paths.13
How do I run a background service?ollama serveEnable Local LLM Service and run lms server startllama-servervllm serve
Can one model answer several users simultaneously?OLLAMA_NUM_PARALLEL controls parallel requests per model.14A CPU user at the time reported requests queued sequentially.15--parallel sets parallel slots, with continuous batching availableContinuous batching, plus multi-GPU model computation
Chat API port in these examples1143412348080 (set below)8000 (set below)

What can AMD integrated graphics, discrete Radeon cards and Intel PCs run?

I was using a Ryzen 7 8845HS. Its integrated Radeon 780M shares system memory with the CPU. I remember running a model successfully on that iGPU and searching my way through issues. Early on February 24 I saved a terminal screenshot: I'd asked the model to write a Chinese college entrance exam essay titled “The Silhouette.” After it finished, the chat prompt returned. The RX 7900 XTX I also researched is a desktop GPU with dedicated VRAM.

Hardware on handOptions in February 2025
AMD Ryzen integrated graphicsTo start chatting, load a 1.5B four-bit GGUF in LM Studio. AMD demonstrated an R1 distilled model of this size on a Ryzen AI 9 HX 370. Some Ryzen AI machines could also use Vulkan so llama.cpp could assign layers to the iGPU. When unsure about the model, get it working on CPU first, then try GPU offload. 1617
Discrete AMD graphics or compute cardThe vLLM v0.6.5 installation page I checked required Linux and ROCm 6.2. ROCm is AMD's software platform for GPU computation. vLLM listed MI200, MI300 and the RX 7900 series (gfx1100). AMD's ROCm 6.2.0 support matrix explicitly included the RX 7900 XTX but didn't list my integrated Radeon 780M. 1318
Intel CPU, integrated or discrete GPUOn Linux the vLLM v0.6.5 OpenVINO backend supported x86-64 CPUs with AVX2 and defaulted to CPU. To use an Intel iGPU or discrete GPU, check the OpenVINO support list, install the GPU driver and set VLLM_OPENVINO_DEVICE=GPU. 19

When short of just a little VRAM, llama.cpp can leave some layers on the CPU. For why that can yield a different generation speed from vLLM temporarily moving weights back to the GPU, see what should the CPU handle when an LLM doesn't fit in VRAM?.

Is Ollama just a wrapper around llama.cpp?

For Ollama v0.5.7, available at the time, calling it a service layer around llama.cpp was accurate. I looked this up too. After ollama run, Ollama finds the model by name, downloads missing files and passes the request to a runner. To compute the next token, the runner calls Decode, which directly invokes llama.cpp's llama_decode. This distinction mattered most to me: Ollama is convenient for downloading and invoking by name. If I have a model file and want to specify its path and GPU parameters myself, I can use llama.cpp directly. 2068

Two Hacker News comments I read disagreed about what “easy” means. v3ss0n thought that since Ollama wraps llama.cpp, using the latter directly was just as easy. BadHumans replied, “Llamacpp is great but saying it is as easy to setup as Ollama just isn't true.” For a first deployment, being able to start a GGUF file with one command and knowing where to find the right file are different things. 21

What do GGML, GGUF and the four-bit or eight-bit labels in filenames mean?

I followed a link from the llama.cpp repository to ggml and later searched is difference betwen gguf and ggml. ggml is the underlying computation library for operations on tensors (multidimensional arrays). Older tutorials also use GGML for an early model file format. GGUF is its successor. It stores the architecture, tokenizer information (how text is split into pieces the model can process) and other metadata as named, typed fields alongside weights. Programs read these fields by name, and the format can accommodate new fields. llama.cpp is a program that runs models with these data. The .gguf extension tells you the container format. The quantization label tells you the weight precision. 22

When I searched “4-bit quantization,” I read Jenqyang's explanation: “量化通过减少每个模型权重所需的位数,显著降低了模型的大小。” Quantization greatly reduces model size by using fewer bits per weight. 23 Imagine weights as numbers recorded on a scale. Eight bits allow 256 codes, four bits only 16. On a coarser scale two nearby numbers may land in the same slot. That explains both why the file shrinks and why it's worth testing quantized answers on your own questions.

Both llama.cpp and LM Studio read GGUF. For the community conversion of DeepSeek-R1-Distill-Qwen-1.5B by bartowski, Q4_K_M is 1.12 GB, Q8_0 1.89 GB. The first uses mainly four bits, with precision varying by part. On a first deployment try Q4_K_M. If memory allows and you care about quality on your regular tasks, repeat the same questions with Q8_0. These are file sizes. Running the model also needs space for conversation context. 2487

Choosing a chat UI: when do you need Open WebUI?

The Bilibili tutorial I watched ran the model with Ollama and connected a browser chat UI. Python 3.11.9 and install.bat in its description were for installing the WebUI. After installation, the browser opened 127.0.0.1:8080. For a terminal-only R1 test, installing Ollama is enough. 26

If you follow shookm's CNBlogs tutorial, open http://localhost:3000 instead. They used Ollama for deepseek-r1:8b and Docker for Open WebUI. The command's -p 3000:8080 connects port 3000 on the computer to port 8080 in the container, so the host browser uses the left-hand number. 25

Where I want to use itWhat to chooseConnecting to the model
Choose models, download and chat with a mouse on my computerLM Studio 0.3.xSearch for DeepSeek in the sidebar, choose a distilled version that fits, download it and load it on the chat page. 7
Already using llama.cpp and just want to try one question in a browserllama.cpp's built-in pageStart the service using the command below and open http://127.0.0.1:8080. The UI and API share a process. 8
Keep one browser UI while switching between Ollama, vLLM and other servicesOpen WebUILaunch it separately, add each service under Admin Settings → Connections, then switch in the chat page's model list. 26
Already have a chat client with a configurable API addressKeep the existing clientChoose an OpenAI-compatible interface, enter the local service address and model ID, for example http://127.0.0.1:8000/v1 for vLLM. 27728

With Open WebUI and the model service directly on the same computer, use http://127.0.0.1:11434 for an Ollama connection and http://127.0.0.1:8000/v1 for an OpenAI-compatible vLLM connection. Save it, select a model and send a message to verify it. If Open WebUI runs in Docker, 127.0.0.1 points to the container. Use a host address the container can reach and ensure the model service listens on it. 26

Want local answers grounded in web material? I also read a Zhihu tutorial connecting R1 32B to Open WebUI for web-backed Q&A. 29 Open WebUI provides web search. Yang Peiwen's blog demonstrated two steps: enable web search in the admin panel, select DuckDuckGo and save, then return to chat and turn on search for that question. The model can answer from the retrieved web content. 30

For answers based on your own documents, follow local document Q&A with Ollama and Chroma and inspect which original passage it finds before answering. I also followed DeepSeek's integrations list to RAGFlow and PingCAP's AutoFlow. The latter packaged the knowledge base as a Q&A box embeddable on a page. I covered both and the additional questions a document graph can answer in another GraphRAG note.

Which is faster? What should a single user or a shared service measure?

When chatting alone, there are two waits. Time to first token (TTFT) runs from pressing send to the first token appearing. Output tokens/s measures how quickly text appears afterward. Tokens are the model's text units. A token can be a character, a word or part of one. For shared use, also measure requests completed per second across the service and how long later users wait.

How fast can one person's answer appear?

When testing Ollama's native /api/generate, the final response's eval_count is the generated token count and eval_duration is generation time in nanoseconds. In hguisu's Llama 3 example, 122 tokens took about 24.64 seconds, or 122 ÷ 24.64 ≈ 4.95 tokens/s. This covers generation only. The user's total wait also includes processing the prompt and other work. 31

First compare single-answer speed on the same hardware. The MLC team published llama.cpp and vLLM results for Llama 2 70B at FP16, generating 256 tokens from the same short question. Units are output tokens per second. 32

Single answer, GPUs connected by PCIellama.cppvLLM
2 A100s10.4615.27
4 A100s11.0717.64

For my “7900xtx running r1 32b” search, AMD provided a configuration reference on January 29. In LM Studio with Q4_K_M and all layers on the GPU, its recommended maximum for the RX 7900 XTX was DeepSeek-R1-Distill-Qwen-32B. That answers what size model can fit on the card. Actual output speed still depends on context and runtime settings. 16

What should we compare for simultaneous users?

I read arkohut's comparison of Ollama and vLLM on one RTX 4090. Both used Llama 3 8B FP16 weights to avoid comparing the speeds of two different four-bit formats. Ollama processed up to 16 concurrent requests, and vLLM ran version 0.3.3. The author cautioned, “不过并发请求也会导致单个请求的响应时间变长。” Concurrent requests can increase the response time for an individual request. So record both the server's aggregate token count and each person's wait. 33

The vLLM PagedAttention paper studied exactly this question. At the same latency level, the authors reported two to four times the throughput of comparison systems such as FasterTransformer and Orca. These were the paper's systems and workloads. The multiplier cannot be directly applied to Ollama or R1. 34

Why can vLLM serve more users on the same card?

One GPU initially handles A and B. Once A finishes translating, C joins the next batch and reuses A's released cache block while B continues writing a long letter.

Diagram drawn for this article. It assumes at most two people per batch. Cache block counts illustrate allocation only.934

Look at “batched computation” in the diagram. Having loaded one layer of weights, the GPU can use it to calculate the next token for A and B. A finishes first, C joins the next round and B continues. This can generate text for more people each second without necessarily improving an individual's output speed. Changing participants each round is continuous batching, which llama.cpp also supports. 348

Now look at the “VRAM blocks.” Halfway through writing, B needs to retain earlier computation results: the KV cache. In both rows B keeps its two original blocks. C can take the block A released and store its own content. vLLM's PagedAttention lets conversations take blocks on demand and return them. Allocated blocks need not be adjacent. That may fit more conversations into the same VRAM. 34

If three users all query the same model, change OLLAMA_NUM_PARALLEL in the Linux Ollama service configuration. OLLAMA_MAX_LOADED_MODELS controls how many different models can remain resident together. With systemd, put the environment variables in the service's [Service] section, reload configuration and restart before testing. 3514

VRAM also limits parallelism. If only two requests can run, the third person waits for a slot. Raising the setting to three requires room for the third conversation's cache. Ollama's contemporary FAQ gives a concrete example: with 2K context per request, four parallel requests require memory for 8K combined context. 14

Back to “how do I run three simultaneous requests?” Warm up your model, then send three different questions of similar length, first sequentially and then simultaneously. Fix the model file, context length and output limit across rounds, enable streaming, and record time from submission to first text and to completion for each question. If long silence happens only when all three ask together, check parallelism and available VRAM first. If one user also waits a long time, first check whether the model loaded onto the GPU. 14

How do I get my first reply with Ollama?

We'll run DeepSeek-R1-Distill-Qwen-1.5B, based on a small Qwen model and trained on R1's answers. The Ollama registry calls it deepseek-r1:1.5b. Starting at this size lets us verify the terminal and chat API paths. 136

  1. Choose your OS on the official download page and install. Open Ollama on macOS or Windows. On Linux, if there's no background service after installation, run ollama serve in one terminal, leave it open and continue in another.
  2. Run ollama --version. A printed version means the terminal can find Ollama. Then run the following command. First use downloads the model. Later runs reuse the local copy. 3736
ollama run deepseek-r1:1.5b "请只用一个字回答:一加一等于几?"

A reply means you've completed local inference. To chat for several turns, run ollama run deepseek-r1:1.5b, type questions at the prompt and enter /bye to finish. At the interactive prompt, /set parameter temperature 0.2 adjusts randomness. At lower values the model tends to pick the most likely next word. Higher values usually yield more varied wording. 38

If using the RX 7900 XTX from the introduction, you'll find it on Ollama's Linux and Windows support lists. Once the model replies, run ollama ps while it's still in memory. The PROCESSOR column tells you whether it used GPU, CPU or a split. 1214

How do I know my own program can call it?

Keep Ollama running and execute this request in macOS, Linux or Git Bash on Windows. 127.0.0.1 means your computer. stream: false waits for the full reply before returning. 27

curl http://127.0.0.1:11434/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"deepseek-r1:1.5b","messages":[{"role":"user","content":"请只用一个字回答:一加一等于几?"}],"stream":false}'

In the JSON, choices[0].message.content holds the generated answer. For connection refused, check whether Ollama is running. For model not found, use ollama list to check the name and the tag after the colon. To continue the same conversation with a model, see keeping separate histories for different users.

How do I run a Hugging Face model or an already downloaded GGUF in Ollama?

Starting with a repository address. JPPeng used Qwen2.5-1.5B to demonstrate running GGUF directly from Hugging Face. For the R1 distilled model here, change the repository name. Choose either of the next commands. Both specify Q4_K_M from the same repository and download the required files on first use. 394024

# 用 Ollama
ollama run hf.co/bartowski/DeepSeek-R1-Distill-Qwen-1.5B-GGUF:Q4_K_M

# 用 llama.cpp
llama-cli -hf bartowski/DeepSeek-R1-Distill-Qwen-1.5B-GGUF:Q4_K_M

Starting with a .gguf file. I also looked up where Ollama downloads weights. If you already have the original, you can skip searching the cache and downloading again. Tinywan demonstrated a local import using a Chinese Llama 3 model. Two files matter: .gguf holds the weights, while Modelfile is a plain-text configuration telling Ollama which weights and defaults to use. The simplest config needs just one FROM directive. Save this line in a file named Modelfile beside the GGUF, substituting the filename you downloaded. 4110

FROM ./DeepSeek-R1-Distill-Qwen-1.5B-Q4_K_M.gguf

For less randomness by default, add PARAMETER temperature 0.2 below FROM. SYSTEM can set an assistant's default behavior with a system prompt. The settings are saved under the model name and reuse the same weights. 42

Run these two commands in that directory. The first creates a local model called r1-local from the configuration. The second starts a chat by name. With llama.cpp you can instead pass the same file's path directly to -m, as the next section shows. 418

ollama create r1-local -f Modelfile
ollama run r1-local

How do I start the same model in the other three tools?

Choose one of the following three routes. Each uses DeepSeek-R1-Distill-Qwen-1.5B, though downloaded weights can differ in format and precision.

LM Studio: use the mouse throughout. Install LM Studio, open Discover, search DeepSeek-R1-Distill-Qwen-1.5B-GGUF, select Q4_K_M from bartowski's repository and download it. In Chat, choose the model at the top, load it and enter the earlier question. That's enough for chat. To call it from code, open Developer and enable Start Server, using port 1234 here. 716 If Discover can't find it, download the GGUF in a browser, place it in the local model directory and return to Chat to load it. The illustrated tutorial I read, Good news for AMD card owners! Deploy DeepSeek R1 locally in three steps without a command line, includes this route. 43

llama.cpp: run the downloaded file directly. On the project's Releases page, choose a package matching your system and hardware that includes llama-server. Extract it and download DeepSeek-R1-Distill-Qwen-1.5B-Q4_K_M.gguf from bartowski's file list into the executable's directory. Open a terminal there and run the following. In Windows PowerShell replace ./llama-server with .\llama-server.exe. 248

./llama-server -m DeepSeek-R1-Distill-Qwen-1.5B-Q4_K_M.gguf --host 127.0.0.1 --port 8080

Once the server starts listening, open http://127.0.0.1:8080 to chat. The same service accepts chat requests from programs. 8

A Node.js app can load local GGUF files directly too. The Llama CPP example in LangChain.js passes a model file path to LlamaCpp, which calls llama.cpp through node-llama-cpp underneath, eliminating a separate HTTP service. 44

vLLM: serve an API on a GPU server. Check the GPU model and drivers against the official installation page. This example assumes an NVIDIA server with CUDA vLLM installed or a supported AMD server with ROCm vLLM installed. First use downloads weights from Hugging Face. --max-model-len 2048 limits input and generated text together to 2,048 tokens. To limit only the answer, add "max_tokens": 256 to the subsequent chat request. 132845

vllm serve deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B --host 127.0.0.1 --port 8000 --max-model-len 2048

How can I reuse the request after changing tools? All four routes support the /v1/chat/completions endpoint used here. On the server machine, open http://127.0.0.1:端口/v1/models, replacing 端口 (“port”) with the table's number. Find the loaded model's id in the returned data list, substitute it for model in the earlier curl command, and change the port. For the vLLM example, use 8000 and deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B. The same question can verify the entire program-to-model path after switching tools. 277828

The vLLM docs describe two similarly named endpoints. To continue a passage, use /v1/completions and put the beginning in prompt. To chat as above, use /v1/chat/completions and put the question in the messages list. Each message specifies who spoke (role) and what they said (content). 46

How can I run the same model in Python without an API service?

I read Aditi Bindal's NodeShift tutorial. She used Transformers in a Jupyter notebook to ask the 1.5B model questions directly. Here is an adapted CPU example for changing prompts and inspecting return values. Open a Linux notebook with Python 3.11 and install dependencies in the first cell. This uses CPU PyTorch to avoid GPU driver setup at the outset. 37

%pip install torch==2.5.1 --index-url https://download.pytorch.org/whl/cpu
%pip install transformers==4.49.0

Run the following in the second cell. First use downloads weights from Hugging Face separately, even if Ollama has already downloaded a model of the same name.

from transformers import pipeline

chat = pipeline(
    "text-generation",
    model="deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B",
    device=-1,  # 使用 CPU
)
messages = [{"role": "user", "content": "一加一等于几?"}]
reply = chat(messages, max_new_tokens=256, return_full_text=False)
print(reply[0]["generated_text"])

The last line prints newly generated text. To try another question, change messages and rerun the last three lines. The loaded model can be reused. 47

How far did I get compiling CPU vLLM on this machine?

  1. Device detection failed at startup. At 01:46 on February 24 I tried starting Qwen/Qwen2.5-Math-7B with vLLM 0.7.3 installed via pip install vllm. After printing an engine PID, it raised RuntimeError: Failed to infer device type. With the default device='auto', vLLM failed to choose a compute backend and exited before loading the model. On Linux that version checked the installed package version for a cpu marker to detect the CPU backend. 48
  2. Switching to the CPU build. Minutes later I searched run deepseek r1 on cpuu usevllm and opened Gaurav Nigam's deployment guide. He ran the 7B distilled model on a Mac with Ollama and found output very slow on his machine. 49 I also tried --device=cpu. Another error sent me searching: is_async_output_supported raised NotImplementedError. In Deploying Qwen2 locally, part three: compiling vLLM for CPU, 康顺哥 posted the same function's error, at line 165 in v0.6.5 versus line 204 in my v0.7.3. 50 The location was informative. vLLM asked the current backend whether it supported asynchronous output but reached a generic interface that immediately raised. The CPU backend would have returned False to indicate the feature was unavailable. 51 I downloaded vLLM source, installed dependencies from requirements-cpu.txt and compiled with VLLM_TARGET_DEVICE=cpu python setup.py install.
  3. Checking build dependencies on Ubuntu. I looked up the Ubuntu 22.04 and 24.04 package pages and ran sudo apt install libnuma-dev. The CPU build guide for that vLLM version listed it. It provides development files such as numa.h so the CPU backend can arrange memory access according to thread location. The generated linker command on my machine included -lnuma, linking that library into the extension. 52
  4. Finding the failing build step. Early February 24, setup.py raised CalledProcessError while invoking CMake to build vLLM's native _C extension. The traceback's last line, exit status 1, only said a subprocess failed. I recreated the build directory, manually ran cmake --build . -j=16 --target=_C and used --verbose to see the actual commands. Start with the first compiler or linker error in verbose output for such failures. I also installed the Python development package python3-dev. The surviving verbose log only says ninja: no work to do., meaning there were no targets to rebuild on that rerun. The original failure's cause remains uncertain.
  5. Confirming the CPU backend. The February 25 log records successful installation of 0.7.4.dev53+geb24dc4a.cpu. Later checks in the preserved virtual environment confirmed automatic CPU detection, False from the asynchronous-output check as expected, and successful loading of the compiled vllm._C extension. For the two initial startup errors, the solution was building and installing vLLM from source with the CPU backend. I remember eventually getting vLLM running. Shell history includes commands retrying Qwen, but I have no record of the exact response from that 7B model run.

Footnotes

  1. DeepSeek. (2025, January 20). DeepSeek-R1 release. DeepSeek API Docs. 见 “Open-Source Distilled Models”。 ↩ ↩2

  2. 汤团猪. (2025, January 30). 本地部署DeepSeek R1模型, 有手就行,含全功能的webUI界面 [视频]. 哔哩哔哩。见视频简介的安装步骤和本地访问地址。 ↩ ↩2

  3. 柏企. (2025, February 3). VLLM 与 Ollama:如何选择合适的轻量级 LLM 框架?. 知乎专栏。日期为页面标注的编辑日期。示例见第四节“VLLM入门教程”第 2 步。 ↩

  4. allglenn. (2025, January 29). VLLM vs. Ollama: Choosing the Right Lightweight LLM Framework for Your AI Applications. Stackademic. 引文见“Getting Started with VLLM”第 2 步。 ↩

  5. vLLM Project. (2025). Quickstart (v0.7.2), Offline Batched Inference. vLLM Docs. ↩

  6. Ollama contributors. (2025). Ollama v0.5.7. GitHub. ↩ ↩2 ↩3

  7. LM Studio Team. (2025, January 29). DeepSeek R1: Open source reasoning model. LM Studio Blog. 启动后台服务见 LM Studio Team. (2024, October 22). LM Studio 0.3.5. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7

  8. llama.cpp contributors. (2025, January 20). llama.cpp HTTP server (b4514). GitHub. llama.cpp 项目仓库。 ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9

  9. vLLM Project. (2025). vLLM v0.7.2. GitHub. ↩ ↩2

  10. Ollama contributors. (2025). Importing a model (v0.5.7). GitHub. ↩ ↩2

  11. vLLM Project. (2025). GGUF (v0.7.2). vLLM Docs. ↩

  12. Ollama contributors. (2025). GPU support (v0.5.7). GitHub. ↩ ↩2

  13. vLLM Project. (2024). Installation with ROCm (v0.6.5). vLLM Docs. 另见 v0.7.2 安装文档. ↩ ↩2 ↩3

  14. Ollama contributors. (2025). FAQ (v0.5.7). GitHub. ↩ ↩2 ↩3 ↩4 ↩5

  15. Is there any way to enable parallel request processing in LMStudion when running on CPU? (issue #36). (2024, April 19). GitHub. ↩

  16. AMD. (2025, January 29). Experience the DeepSeek R1 distilled reasoning models on AMD Ryzen AI and Radeon. AMD Blog. 见第 5 步显卡表和第 8 步 GPU 卸载设置。 ↩ ↩2 ↩3

  17. AMD. (2024, October 30). Accelerating llama.cpp performance in consumer LLM applications with AMD Ryzen AI 300 Series. AMD Blog. 见 LM Studio 的 Vulkan 与 CPU 测试。 ↩

  18. AMD. (2024, October 3). System requirements (Linux), ROCm 6.2.0. ROCm Documentation. 见“Supported GPUs”中的 AMD Radeon 表。 ↩

  19. vLLM Project. (2024). Installation with OpenVINO (v0.6.5). vLLM Docs. 支持范围见开头和“Requirements”,设备选择见 VLLM_OPENVINO_DEVICE。 ↩

  20. Ollama contributors. (2025). Ollama v0.5.7 [源代码]. GitHub. 主程序和 CPU/GPU 运行器的构建方式见开发文档 Overview。推理调用见运行器调用 Decode 和调用 llama_decode 的 Go 绑定。 ↩

  21. v3ss0n & BadHumans. (2024, June 15). Ollama v0.1.45 [讨论串评论]. Hacker News. v3ss0n 的原评论及 BadHumans 的直接回复,引文为回复首句。 ↩

  22. ggml contributors. (n.d.). ggml [源代码]. GitHub. GGUF 元数据和旧文件格式的关系见 llama.cpp contributors. (2023). GGUF 格式的引入说明。 ↩

  23. Jenqyang. (2023, December 7). LLM量化综合指南(8bits/4bits). 知乎专栏。引文见“量化是如何缩小模型的?”小节第 2 段。 ↩

  24. bartowski. (2025, January). DeepSeek-R1-Distill-Qwen-1.5B-GGUF. Hugging Face. 见 “Downloads” 的 Q4_K_M 和 Q8_0 文件,以及一月的上传记录。 ↩ ↩2 ↩3

  25. shookm. (2025, February 6). DeepSeek-R1本地部署简单使用. 博客园。模型命令见 §3.2“安装 Ollama”,端口映射见 §4.1“Open-WebUI”。 ↩

  26. Open WebUI contributors. (2025). Open WebUI v0.5.10. GitHub. ↩ ↩2

  27. Ollama contributors. (2025). OpenAI compatibility (v0.5.7). GitHub. ↩ ↩2 ↩3

  28. vLLM Project. (2025). Quickstart (v0.7.2). vLLM Docs. ↩ ↩2 ↩3

  29. 部署 DeepSeek R1 32B + Open WebUI 教程,支持联网问答,支持 Windows、Mac. (n.d.). 知乎专栏。 ↩

  30. 杨培文. (2025, February 1). 部署 DeepSeek R1 32B + Open WebUI 教程. 杨培文的 blog. 见“网络搜索”。 ↩

  31. hguisu. (2024, May 6). 大模型llm(1):Ollama部署llama3学习入门llm. CSDN. 数值见第四节“访问 api 服务”的响应示例。纳秒换算见 Ollama contributors. (2025). API (v0.5.7). ↩

  32. MLC team. (2023, November 14). LLM performance benchmarking. GitHub. 见 “Multiple NVIDIA GPUs, FP16” 表及测试命令。 ↩

  33. arkohut. (2024, May 22). ollama 支持并发之后和 vllm 相比性能如何?我们测测看. CSDN. 引文见“环境准备”前一段;硬件、权重和并行设置见“环境准备”。 ↩

  34. Kwon, W., Li, Z., Zhuang, S., Sheng, Y., Zheng, L., Yu, C. H., Gonzalez, J. E., Zhang, H., & Stoica, I. (2023). Efficient memory management for large language model serving with PagedAttention. SOSP ’23, §4. 亦见 vLLM 团队的分块分配示意图。 ↩ ↩2 ↩3 ↩4

  35. zeloas (yao_zhuang). (n.d.). Ollama 配置多并发和多模型. CSDN. 见“Linux为例”的服务配置。 ↩

  36. Ollama. (n.d.). deepseek-r1:1.5b. Ollama Model Library. ↩ ↩2

  37. Bindal, A. (2025, January 27). A step-by-step guide to install DeepSeek-R1 locally with Ollama, vLLM or Transformers. NodeShift, DEV Community. 见“Installation using Ollama”第 2 步和“Installation using Transformers”第 4–5 步。页面标注于 2 月 26 日编辑。 ↩ ↩2

  38. Liss, J. (2024, February 17). How to set ollama temperature from command line. GenAI Stack Exchange. 见提问中交互模式的 /set parameter temperature 示例。 ↩

  39. JPPeng. (2024, November 8, 编辑). Ollama:Ollama run加载GGUF模型. 知乎专栏。见第 2 节 Qwen2.5 的 Hub 地址和量化标签示例。 ↩

  40. Hugging Face. (2025, February). Use Ollama with any GGUF Model on Hugging Face Hub 和 GGUF usage with llama.cpp. Hugging Face Hub. 见当时的 Ollama 仓库名与量化标签示例 和 llama.cpp 的 -hf 示例。 ↩

  41. Tinywan. (2024, May 16). Ollama如何构建自己的Llama3中文模型. 51CTO。见“应用模型”第 0X02–0X04 步,从本地 GGUF 创建并运行 Ollama 模型。 ↩ ↩2

  42. Ollama contributors. (2025). Modelfile reference (v0.5.7). GitHub. 必填的 FROM、可选指令及配置示例。 ↩

  43. A卡福音!3步本地部署DeepSeekR1,完全无需命令行. (n.d.). 网易订阅。操作见什么值得买同题文章(2025 年 2 月 19 日)第 2、3 步及“开始使用DeepseekR1”。 ↩

  44. LangChain. (n.d.). Llama CPP. LangChain.js Docs. 见 “Usage”。我在 2025-03-04 搜 node llama cpp 时读到此页,同日下午还打开了旧页的 Related 小节。 ↩

  45. vLLM Project. (2025). Engine arguments (v0.7.2). vLLM Docs. 见 --max-model-len。 ↩

  46. vLLM Project. (2025). OpenAI-Compatible Server (v0.7.3), Supported APIs. vLLM Docs. ↩

  47. Hugging Face. (2025). TextGenerationPipeline (v4.49.0). GitHub. 见聊天消息示例及 return_full_text 参数说明。 ↩

  48. vLLM Project. (2025). vLLM v0.7.3 [源代码]. GitHub. 见 CPU 后端检测和 DeviceConfig 的自动设备选择。 ↩

  49. Nigam, G. (2025, January 31). How to run DeepSeek-R1 efficiently: A step-by-step guide. aingineer, Medium. 见第 1 节“Run a Smaller Distilled Model (DeepSeek-R1 7B)”命令下方的实测说明。 ↩

  50. 康顺哥(F8_11). (2024, December 24). 本地部署Qwen2大模型之三:编译CPU版vLLM. CSDN. 见“走捷径”中的异常栈及随后对 is_async_output_supported 的源码分析。 ↩

  51. vLLM Project. (2025). vLLM v0.7.3 [源代码]. GitHub. 见通用平台接口和 CPU 后端实现。 ↩

  52. Ubuntu. (n.d.). libnuma-dev in Ubuntu Noble. Launchpad. 另见 vLLM Project. (2025, February). CPU 构建指南中的安装命令及CPU 后端的内存节点选择。 ↩

© 2025 borui. All rights reserved. This content may be freely reproduced, displayed, modified, or distributed with proper attribution to borui and a link to the article: borui (2025-02-24). Deploying a local LLM: How do you choose between Ollama, LM Studio, llama.cpp and vLLM?. https://caiborui.com/blog/2025-02-24-zh-local-llm-deployment-entrans

@misc{borui2025-9d601d03,
  author = {borui},
  title = {{Deploying a local LLM: How do you choose between Ollama, LM Studio, llama.cpp and vLLM?}},
  year = {2025},
  publisher = {borui's blog},
  url = {https://caiborui.com/blog/2025-02-24-zh-local-llm-deployment-entrans}
}