docs: 修复文档中与源码不符的类名、方法签名和模块归属

- CONTRIBUTING.md: ruff/pytest 命令改为 conda 方式
- params.md: max_len → max_tokens
- introduction.md: max_len=1024 → max_tokens=None
- dataflow.md: PagedCache/CacheView → KVCache/KvcacheView
- design.md: 全面修正类图(PagedCache→Allocator等6个新类、删除position_ids误参、修正BaseDataset字段和25+条关系线、Module Overview更新)
This commit is contained in:
2026-05-14 20:26:24 +08:00
parent 205b40bd28
commit d8da2cf17c
5 changed files with 129 additions and 57 deletions
+4 -4
View File
@@ -36,10 +36,10 @@ If you encounter a bug or have a feature request, please open an issue on GitHub
AstrAI uses [Ruff](https://docs.astral.sh/ruff/) for code formatting and linting. Please ensure your code is formatted before submitting.
- Run Ruff to format and lint:
- Run Ruff to format and lint (requires conda environment `nlp`):
```bash
ruff format .
ruff check --fix .
conda run -n nlp ruff format .
conda run -n nlp ruff check --fix .
```
- The project uses **double quotes** for strings and **4space indentation** (as configured in `pyproject.toml`).
@@ -49,7 +49,7 @@ If you add or modify functionality, please include appropriate tests.
- Run the test suite with:
```bash
pytest
conda run -n nlp python -u -m pytest
```
- Ensure all tests pass before submitting your PR.