跳到主要内容Skip to main content

做模型专题How models are made

把日志留在本地到底意味着什么What keeping logs on your own machine actually means从业者视角的方法论 · 关键事实挂官方出处practitioner-perspective methodology · key facts carry official sources

把「日志留在本地」拆成三条线:写在哪、谁能读、留多久。逐条给运行器官方文档里的证据位置,并说明磁盘加密、备份同步与监听地址为什么都不在这四个字里。Unpack "logs stay local" into three lines: where they are written, who can read them, and how long they persist. Each item points at the runner's own documentation, and explains why disk encryption, backup sync and bind address are not contained in those four words.

这是存储位置陈述,不是保密承诺A storage-location statement, not a confidentiality promise

「把日志留在本地」是一句关于文件写入位置的陈述,不是保密承诺。

它只说明目标路径在同一台机器上,不说明谁能读、别处有没有副本,也不说明留多久。

本站不替你判断任何合规义务,也不把「本地」写成「安全」。这一篇给的是核对顺序与证据位置。

"Keeping logs local" is a statement about where files are written. It is not a confidentiality promise.

It says the target path is on this machine. It does not say who can read them, whether copies exist elsewhere, or how long they persist.

This site does not judge any compliance obligation for you and never writes "local" as "safe". This guide gives the checking order and where the evidence lives.

先分清三条线Separate the three lines first

三个问题要三类证据,合并成一个「本地」就会漏掉东西。

  • 写在哪:日志、会话历史、崩溃转储、缓存与临时文件是不同文件。
  • 谁能读:账户权限、进程权限、磁盘是否加密、备份是否同步。
  • 留多久:轮转策略、保留上限、删除之后是否还留有历史副本。

查不到说明时只有一条处理办法:官方未说明就记为未说明。不用「一般都这样」替它补答案。

The three questions need three kinds of evidence; collapsing them into the word "local" loses things.

  • Where they are written: logs, chat history, crash dumps, caches and temporary files are separate targets.
  • Who can read them: account permissions, process permissions, whether the volume is encrypted, and whether backups synchronise.
  • How long they persist: rotation policy, retention ceiling, and whether historical copies survive deletion.

When documentation gives no answer there is one handling rule: record it as not stated. Do not substitute "that is how it usually goes" for an answer.

默认落在哪里Where the files land by default

这一层只有运行器自己的文档能回答,本站不代读任何机器。

  • Ollama 的排障文档给了日志位置:macOS 看 ~/.ollama/logs/server.log;Windows 给的是 %LOCALAPPDATA%\Ollama 目录;Linux 用 journalctl -u ollama 查看。位置见 troubleshooting。
  • 同一家的问题页写明模型保存在 ~/.ollama/models,见 faq。模型文件与日志是两类对象,保留策略分开记。
  • vLLM 把日志做成一组独立开关:VLLM_CONFIGURE_LOGGING、VLLM_LOGGING_LEVEL、VLLM_LOG_STATS_INTERVAL,见 env_vars。
  • llama-server 的参数表列出 --log-disable 与 --api-key,见 server 参数文档。请求内容是否写入日志、按什么级别写,以该页与所用版本的说明为准。

Only the runner's own documentation answers this layer. This site reads no machine on your behalf.

  • Ollama's troubleshooting page gives log locations: macOS reads ~/.ollama/logs/server.log; Windows points at the %LOCALAPPDATA%\Ollama folder; Linux is viewed with journalctl -u ollama. Location: troubleshooting.
  • The same vendor's FAQ page states models are stored under ~/.ollama/models; see faq. Model files and logs are different objects with different retention settings.
  • vLLM exposes logging as separate switches: VLLM_CONFIGURE_LOGGING, VLLM_LOGGING_LEVEL, VLLM_LOG_STATS_INTERVAL; see env_vars.
  • The llama-server argument list includes --log-disable and --api-key; see the server argument documentation. Whether request content is written, and at what level, follows that page and the version in use.

留在本地不等于不出去Local files do not stay local by themselves

四条通道会让「留在本地」这个说法变得不准确,每条都要单独处理。

  • 备份与同步:网盘、系统备份工具会连同日志目录一起复制出去,副本不再受原路径控制。
  • 加密与密钥去向:微软的 BitLocker 概览写明整卷加密针对的是设备丢失、被盗带来的数据窃取与暴露风险;同一页面也说明设备加密会把恢复密钥备份到 Microsoft Entra ID、AD DS 或用户的 Microsoft 账户。见 BitLocker Overview。
  • 监听地址:Ollama 的文档写用 OLLAMA_HOST 改绑定地址,见 faq。绑到全部网卡时,同一网络里的其他机器也能发请求。
  • 凭据:--api-key 一类设置决定谁能调用本机服务,密钥与被调用的内容都可能出现在别的日志里。

加密保护静态数据,密钥位置是另一件事。这四个通道都能关,但没有一个是「本地」两个字自动关掉的。

Four channels make "kept local" inaccurate, and each needs handling on its own.

  • Backup and sync: cloud drives and system backup tools copy the log folder along with everything else, and the copy leaves the original path's control.
  • Encryption and where the key goes: Microsoft's BitLocker overview states that full-volume encryption addresses data theft or exposure from lost or stolen devices, and the same page says device encryption backs the recovery key up to Microsoft Entra ID, AD DS or the user's Microsoft account. See BitLocker Overview.
  • Bind address: Ollama's documentation changes the bind address with OLLAMA_HOST; see faq. Bound to all interfaces, other machines on the same network can send requests.
  • Credentials: settings such as --api-key decide who may call the local service, and both the key and the traffic it protects can appear in other logs.

Encryption protects data at rest; where the key lives is a separate matter. All four channels can be closed, but none closes automatically because of the word "local".

日志里装的是什么What the logs actually carry

日志内容由运行器决定,本站不替任何实现假设字段。核对时按四类分开。

  • 请求侧:提示文字、附件或文件路径、工具调用参数、系统提示内容。
  • 响应侧:生成的文字、错误信息、被截断的位置。
  • 运行侧:时间戳、耗时、并发数、请求标识与调用方地址。
  • 派生副本:崩溃转储、调试开关打开后的响应体、按间隔记录的统计。

vLLM 的变量页里有一项把 API 响应写进日志用于调试。它也有一项按秒记录统计。开与不开是两种事实。

某项是否落盘、落在哪个文件、按什么级别落,都回到该运行器的说明去查,不靠惯例推断。

Log content is decided by the runner, and this site assumes no fields on any implementation's behalf. Check the four categories separately.

  • Request side: prompt text, attachments or file paths, tool-call arguments, system prompt content.
  • Response side: generated text, error messages, and where output was truncated.
  • Runtime side: timestamps, durations, concurrency, request identifiers and caller addresses.
  • Derived copies: crash dumps, response bodies written while a debug switch is on, and statistics logged at an interval.

One vLLM variable writes API-server responses to the log for debugging. Another records statistics at an interval. On and off are two different facts.

Whether a field is persisted, into which file, and at what level all go back to that runner's documentation rather than to convention.

留存与删除要按顺序做Retention and deletion, in order

顺序错一步,删除就只是错觉。下面五步按顺序做,每步都要写日期。

  • 先列写入点:日志、会话历史、缓存、临时文件、崩溃目录各算一条。
  • 再定上限:按天数还是按大小轮转,两处都要写明由谁设置。
  • 然后查副本:备份、同步盘、快照与容器卷是否另有一份。
  • 删除之后复查:原路径与副本位置各查一次,两次都要有记录。
  • 最后记口径:写了查了什么、哪天查、结论覆盖到哪个范围。

第五步的记录只证明记录当天的状态。它不证明过去,也不保证以后。

Skip one step in this order and deletion becomes an illusion. Do the five steps in sequence and date each one.

  • First list the write points: logs, chat history, cache, temporary files and crash folders as separate lines.
  • Then set the ceiling: rotation by age or by size, and who configured it.
  • Then look for copies: backups, sync folders, snapshots and container volumes.
  • After deleting, re-check: inspect the original path and the copy locations once each, with a record for both.
  • Finally record the scope: what was checked, on which date, and how far the conclusion reaches.

Step five proves only the state on the day it was recorded. It proves nothing about the past and guarantees nothing about the future.

容量与成本的连带账The capacity and cost side-effect

日志吃的是磁盘,不吃容量工作台里那块内存预算,两笔账不要记在同一栏。

  • 增长口径按「每天写入量 × 保留天数」自己估,本站不给任何通用数值。
  • 任务内存的假设、字段与单位在容量工作台里逐项填:上下文与并发预算。
  • 费用构成用 成本计算器 记录,存储与备份是其中的独立项。
  • 工作台的 KV 算式只管各层结构相同的标准全注意力 MHA / GQA 解码器,与日志留存没有推导关系;MLA、混合与滑动窗口要另算,磁盘那笔更不在它里面。

Logs consume disk, not the memory budget the capacity workbench calculates. Keep the two bills in separate columns.
- Estimate growth yourself as daily writes times retention days; this site publishes no generic figure.
- Task-memory assumptions, fields and units are entered in the workbench: context and concurrency budget.
- Record cost components with the cost calculator; storage and backup are separate lines inside it.
- The workbench's KV formula covers only standard full-attention MHA/GQA decoders with identical layers and has no derivation link to log retention. MLA, hybrid and sliding-window designs need separate arithmetic, and disk is not in that formula at all.

能说什么、不能说什么What this does and does not establish

能说的一句话是:本机能列出写入点、权限与保留期,而且每次核对都带日期。

不能说的一句话是:本地跑就满足了某个合规要求。加密不等于没人读得到,删了文件也不等于没有副本。

  • 不写法律意见,不替代你所在辖区的义务判断。
  • 不做「哪种部署更隐私」的排名,也不把某个运行器说成更安全。
  • 未核到的字段一律留空,不用默认惯例把它填成事实。

结果核对与排查入口:20 项自测清单、按症状排查。

What can be said: this machine can list its write points, permissions and retention periods, and each check carries a date.

What cannot be said: that running locally satisfies a given compliance requirement; that encryption means nobody can read it; that deleting a file means no copy exists.

  • No legal opinion, and no substitute for obligations in your own jurisdiction.
  • No ranking of "which deployment is more private", and no calling a particular runner safer.
  • Fields not checked stay blank; local convention is not used to fill them in as facts.

Result checks and troubleshooting entry points: the 20-item self-test and troubleshooting by symptom.

和学 AI 站的分工How this differs from the Learn site

学 AI 站的 数据驻留、隐私与合规、本地部署 与 可观测性 是给使用者的一页科普。

这一篇给的是核对顺序、证据位置和说法边界。同一个概念在两处深度不同,互链不重复。

七件事的总入口见「本地跑起来之前先确认的七件事」。容量算法的边界见「GPU 事实与成本数学」。

The Learn site's data residency, privacy and compliance, local deployment and observability pages are one-page explainers for users.

This guide gives the checking order, evidence locations and statement boundaries. Same concept, different depth, cross-linked without duplication.

For the pre-run overview see "Seven checks before a local run starts", and for formula limits see "GPU facts and cost math".

出处Sources

基础来源快照:2026-11-06;单项补充与核验范围见正文和来源标签。请回原始说明核对规格、方法与适用条件。Base source snapshot: 2026-11-06; item-specific additions and check scope appear in the text and source labels. Check original specifications, methods and conditions.