chore: 修改文件夹结构

This commit is contained in:
ViperEkura 2026-03-31 10:14:08 +08:00
parent b1527d9575
commit 4ead0a20cf
10 changed files with 14 additions and 20 deletions

View File

@ -2,12 +2,6 @@
<!-- <img src="assets/images/project_logo.png" width="auto" alt="Logo"> --> <!-- <img src="assets/images/project_logo.png" width="auto" alt="Logo"> -->
<h1>AstrAI</h1> <h1>AstrAI</h1>
<div>
<a href="#english">English</a>
<a href="assets/docs/README-zh-CN.md">中文</a>
</div>
<p> <p>
<strong>A lightweight Transformer training & inference framework</strong> <strong>A lightweight Transformer training & inference framework</strong>
</p> </p>
@ -80,7 +74,7 @@ pip install -e ".[dev]"
#### Train a Model #### Train a Model
```bash ```bash
python tools/train.py \ python scripts/tools/train.py \
--train_type=seq \ --train_type=seq \
--data_root_path=/path/to/dataset \ --data_root_path=/path/to/dataset \
--param_path=/path/to/param_path --param_path=/path/to/param_path
@ -89,25 +83,25 @@ python tools/train.py \
#### Generate Text #### Generate Text
```bash ```bash
python tools/generate.py --param_path=/path/to/param_path python scripts/tools/generate.py --param_path=/path/to/param_path
``` ```
#### Demo #### Demo
Check out the demos in the `demo/` folder: Check out the demos in the `scripts/demo/` folder:
```bash ```bash
# Download preprocessed data (required before running demos) # Download preprocessed data (required before running demos)
python demo/download.py python scripts/demo/download.py
# Interactive streaming chat # Interactive streaming chat
python demo/stream_chat.py python scripts/demo/stream_chat.py
# Batch generation # Batch generation
python demo/generate_batch.py python scripts/demo/generate_batch.py
# Autoregressive generation # Autoregressive generation
python demo/generate_ar.py python scripts/demo/generate_ar.py
``` ```
Watch a video walkthrough on [bilibili](https://www.bilibili.com/video/BV1z5RPYHEkd). Watch a video walkthrough on [bilibili](https://www.bilibili.com/video/BV1z5RPYHEkd).

View File

@ -75,7 +75,7 @@ pip install -e ".[dev]"
#### 训练模型 #### 训练模型
```bash ```bash
python tools/train.py \ python scripts/tools/train.py \
--train_type=seq \ --train_type=seq \
--data_root_path=/path/to/dataset \ --data_root_path=/path/to/dataset \
--param_path=/path/to/param_path --param_path=/path/to/param_path
@ -84,25 +84,25 @@ python tools/train.py \
#### 文本生成 #### 文本生成
```bash ```bash
python tools/generate.py --param_path=/path/to/param_path python scripts/tools/generate.py --param_path=/path/to/param_path
``` ```
#### 演示 #### 演示
查看 `demo/` 文件夹中的演示: 查看 `scripts/demo/` 文件夹中的演示:
```bash ```bash
# 下载预处理数据(运行演示前必需) # 下载预处理数据(运行演示前必需)
python demo/download.py python scripts/demo/download.py
# 交互式流式聊天 # 交互式流式聊天
python demo/stream_chat.py python scripts/demo/stream_chat.py
# 批量生成 # 批量生成
python demo/generate_batch.py python scripts/demo/generate_batch.py
# 自回归生成 # 自回归生成
python demo/generate_ar.py python scripts/demo/generate_ar.py
``` ```
观看 [bilibili](https://www.bilibili.com/video/BV1z5RPYHEkd) 上的视频演示。 观看 [bilibili](https://www.bilibili.com/video/BV1z5RPYHEkd) 上的视频演示。