MegEngine / InferLLM

a lightweight LLM model inference framework
Apache License 2.0
699 stars 87 forks source link

python API support #12

Open lucasjinreal opened 1 year ago

lucasjinreal commented 1 year ago

Hi, any plan on support python API?

chenqy4933 commented 1 year ago

there is only one header file, supporting python api is easy

lloydzhou commented 1 year ago

实现的思路应该是参考li-plus/chatglm.cpp的pybind的写法,将c++的对象暴露给python使用

chenqy4933 commented 1 year ago

直接把 include/model.h 这个头文件的接口暴露给python就可以了

JaydenGaoXunYi commented 8 months ago

怎么暴露呢,请问大佬能给个具体的代码吗?谢谢!