Open Project folder in Java IDE (Recommended: IntelliJ IDEA Community
) with gradle support and Build the project
- Java Development Kit JDK version: 11
- Gradle version 7+
These files are required to run the project
- ONNX model
tokenizer.json
file
The model conversion which was already provided to you which is saved in file: how to convert mpt-7b-model to onnx format.pdf
and after running that script your model was converted to onnx model and was saved in folder mpt_7b_onnx
, you will have to move the that folder mpt_7b_onnx
to raw-files
in code current directory.
Tokenzer file tokenizer.json
was taken from this huggingface repo
Download the tokenizer.json
from the link
move files
Copy files created from above step into raw-files
directory as shown in the below image
Build the project using This button
Open the Main.java
file and click the play button as shown in the red box in the below image