Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Programming Language for Deep Learning in Python

Notifications You must be signed in to change notification settings

BUAADreamer/DLPy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dlpy: 面向深度学习的Python

环境配置

pip3 install -r requirements.txt
alias dlpy='python3 main.py' #如果需要cli直接运行

模型下载

将模型下载到checkpoints目录下或者自定义目录下

代码示例

example/目录下有常见dlpy代码示例,下面以baichuan2的聊天机器人为例:

model:transformer='checkpoints/baichuan2-7b-chat':'dataset/wiki.txt';
while True{
    print('User:');
    x=scan();
    print('Bot:');
    chat model x;
}

代码运行

python3 main.py examples/sample.dlpy
#快捷运行
dlpy example/sample.dlpy

编译器完整运行结果

python3 test.py examples/if.dlpy

致谢

本项目基于ply,参考了simplepy,感谢这些库的作者!!