Instructions to use thanhtantran/MiniCPM-V-2_6-rkllm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- RKLLM
How to use thanhtantran/MiniCPM-V-2_6-rkllm with RKLLM:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
| from rkllm.api import RKLLM | |
| modelpath = '.' | |
| llm = RKLLM() | |
| ret = llm.load_huggingface(model=modelpath, model_lora=None, device='cpu') | |
| if ret != 0: | |
| print('Load model failed!') | |
| exit(ret) | |
| qparams = None | |
| ret = llm.build(do_quantization=True, optimization_level=1, quantized_dtype='w8a8_g128', | |
| quantized_algorithm='normal', target_platform='rk3588', num_npu_core=3, extra_qparams=qparams) | |
| if ret != 0: | |
| print('Build model failed!') | |
| exit(ret) | |
| # Export rkllm model | |
| ret = llm.export_rkllm("./qwen.rkllm") | |
| if ret != 0: | |
| print('Export model failed!') | |
| exit(ret) | |