反馈 / #1919
#1919 Small defects in setup, serve, the engine and the build, still present on v0.1.42
open · @gputier · 0 评论 · 去 GitHub 看
Setup & installServer & APINVIDIA / CUDAModels & quantsDocumentation
说明
A read of v0.1.42 turned up the defects below. Each one was checked against the source, and the file:line references are v0.1.42 line numbers. None of them changes the normal output on a supported PC, and none is a calculation error. Items marked "read only" follow from the code, but I did not reproduce them on a GPU.
- setup.py:1703 (also whole_shard at setup.py:1547), with tools/gguf_reader.py:66-72: expected_bytes() returns None when the tensor type is missing from BLOCK_GEOMETRY, or when the element count is not a block multiple. Both callers fall back to `or 0`. So a truncated shard whose last tensor has such a type passes check_shards as whole, and the engine fails later. Setup should stop and name the short shard. (read only)
- tools/gguf_reader.py:117 (GGUF_META[t]), tools/gguf_reader.py:112-113 and :128: an unknown metadata value type raises KeyError, and a 64-bit string length makes fh.read() raise OverflowError. setup.py:1701 catches only (ValueError, struct.error), so setup prints a Python traceback instead of a message. Reproduced on a synthetic header: value type 99 gives "KeyError: 99", and a string length of 2**63 gives "OverflowError". Expected: "is not a whole GGUF shard" for every malformed header.
- setup.py:3859-3864 (write_config), with the api_key written at setup.py:5727-5728: the run config holds the API key and is written with the default umask. The write path has no chmod 0600. Expected: mode 0600 on POSIX. (read only)
- setup.py:3829 and setup.py:3847-3848 (data_folder): a folder whose data has already left is skipped (`not has_data(folder)`) before repoint_config runs on its configs. Its strata-*.json files keep the old model paths. Expected: the configs of every install that points into the moved folder get repointed. (read only)
- setup.py:3756-3775 (move_into): there is no symlink check. For a symlink to a directory, src.is_dir() is true and iterdir() follows the link. The target's files are moved out and the link stays in place. Expected: a symlinked folder is left alone, neither merged nor emptied. (read only)
- setup.py:3668-3671 (the low-RAM confirm_risk text): "A smaller size (Q2_0 or IQ2_XS) fits" and "choose Q2_0 or IQ2_XS" are printed for every family. But Q2_0 is offered only for family qwen (MODELS, setup.py:204). With --family swift, the advice names a model that setup does not offer for that family. Expected: the suggestion lists only the models of the chosen family.
- tools/iq_pack.py:575 now writes native_experts.txt through a temporary file. setup.py:5531, however, treats the file's existence alone as "pack finished". A native_experts.txt left by a run before #172 is still accepted, so the pack is not rebuilt. Expected: the completeness check reads the content (or a size or hash) before skipping the build. (read only)
- serve/server.py:843-844 (death_note): when no watchdog line is found, the cause is taken from the last log line starting with "strata" or "ERR". A progress line such as "strata trace: read N tokens" (src/program/generate.cpp:10776) can therefore be quoted as the cause of the exit. Expected: only an exit or error line is quoted. (read only)
- docs/DETAILS.md:652-662: the endpoints table has no row for /settings. The route appears only in prose, at lines 871 and 891. Expected: a table row for GET and POST /settings, with the same API-key rule as the prose.
- .gitignore:22: the comment "# Pi harness metadata (local session state, not project source)" is not followed by any pattern that matches Pi harness metadata. The patterns below it (*.sqlite, *.npz) do not match it. Expected: remove the comment, or move it above the patterns it describes.
- src/program/generate.cpp:10787 and :10794 (prompt read failure in serve): cudaPeekAtLastError() reads the last CUDA error without clearing it. So an error that was already handled and is not sticky makes the engine call std::_Exit(1) instead of returning 1 (line 10787). When stop_req is set, a fault raised at the same time is reported as a cancellation (cancelled = true, line 10794) without checking the error. Expected: a sticky check with cudaGetLastError(), and the error checked in the stop branch too. (read only)
- src/program/generate.cpp:7420-7424 with src/core/verify.cpp:495-501: serve with no expert cache (d_res == nullptr) fails in Verifier::init ("verify: needs the profile-filled VRAM expert tier ..."), and serve returns 1, so no server starts. The message suggests a smaller --max-context, --kv q4_0, --draft-vocab en, or images on the CPU. None of these lets the server start without a cache. Expected: either a serve path that works without the cache, or a refusal that names a setting that does work. (read only)
- src/program/generate.cpp:12096-12108 (generate mode): with no residency table, the prompt path does not lend cache slots and keeps the automatic chunk, prefill_auto_max, which defaults to 8192 (generate.cpp:527). The fallback to 1024 for a card with no cache (generate.cpp:7035-7036, "#85") exists only in the serve path. Expected: the same 1024 fallback in generate mode. (read only)
- src/core/device.cu:247 and :309 (device_info): the compute capability refusal (kMinCc = 75) runs only inside device_info(). Its only caller in the tree is src/core/device_main.cpp:66 (strata-device). The engine does not call device_info(), so in the engine a card below 7.5 is not refused by this check. Expected: the same refusal in the engine start path, or a comment saying the check is diagnostic only.
- CMakeLists.txt:164: `continue()` for the values native, all and all-major skips the rest of the loop body. So the warning for sm_120 with CUDA below 13.0 (CMakeLists.txt:183-185) is never printed for those values. Read only: the warning was not seen with a real CUDA 12.8 toolkit. Expected: the warning runs for every value that resolves to sm_120.
- CMakeLists.txt (whole file): the Python tests (serve/test_*.py and tools/test_*.py) are not registered with add_test, so ctest does not run them. The .github/ directory holds only the issue and pull request templates, with no workflow, so no CI runs them on a push either. Expected: the Python tests are registered in ctest, and a workflow runs ctest and the Python tests.
- Missing tests: no test exercises repoint_config (setup.py:3777), _cpuid_avx2 (setup.py:713) or the need_cuda version gate (setup.py:3229). Expected: one test for each.
本站相关内容
相关页面的快捷入口。