Skip to content

Commit ee26e3e

Browse files
committed
readme 更新
1 parent cfcdc39 commit ee26e3e

File tree

5 files changed

+35
-1
lines changed

5 files changed

+35
-1
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,39 @@
77
./build_aarch64.sh # aarch64 交叉编译
88
```
99

10+
## 模型获取
11+
[Qwen2.5-1.5B-Instruct](https://huggingface.co/AXERA-TECH/Qwen2.5-1.5B-Instruct)
12+
13+
## 配置文件
14+
根据模型下载路径修改
15+
```json
16+
{
17+
"template_filename_axmodel": "qwen2.5-1.5b-ctx-ax650/qwen2_p128_l%d_together.axmodel",
18+
"axmodel_num": 28,
19+
"url_tokenizer_model": "./tests/tokenizer/qwen2_5_tokenizer.txt",
20+
"filename_post_axmodel": "qwen2.5-1.5b-ctx-ax650/qwen2_post.axmodel",
21+
"filename_tokens_embed": "qwen2.5-1.5b-ctx-ax650/model.embed_tokens.weight.bfloat16.bin",
22+
"tokens_embed_num": 151936,
23+
"tokens_embed_size": 1536,
24+
"use_mmap_load_embed": 1
25+
}
26+
```
27+
28+
## 用例
29+
30+
### C++
31+
```shell
32+
./test_translate -c config.json -t "hello,world!"
33+
output: 你好,世界!
34+
```
35+
36+
## Gradio
37+
```shell
38+
python gradio_example.py --config ../build/config.json
39+
```
40+
![chs.png](pytranslate/chs.png)
41+
![jpn.png](pytranslate/jpn.png)
42+
![thai.png](pytranslate/thai.png)
43+
1044
## 社区
1145
QQ 群: 139953715

pytranslate/chs.png

30.8 KB
Loading

pytranslate/gradio_example.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def translate_text(text, lang):
6161

6262
# Gradio界面
6363
with gr.Blocks() as demo:
64-
gr.Markdown("# 🔍 Det Demo")
64+
gr.Markdown("# 🔍 Translate Demo")
6565
lang_dropdown = gr.Dropdown(
6666
choices=lang_set,
6767
value="英文",

pytranslate/jpn.png

30.1 KB
Loading

pytranslate/thai.png

29.7 KB
Loading

0 commit comments

Comments
 (0)