Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

模型转换报错: Catch exception when loading dataset #121

Open
sdrzmgy opened this issue Nov 15, 2024 · 1 comment
Open

模型转换报错: Catch exception when loading dataset #121

sdrzmgy opened this issue Nov 15, 2024 · 1 comment

Comments

@sdrzmgy
Copy link

sdrzmgy commented Nov 15, 2024

错误信息:

(rkllm) python rkllm-toolkit/examples/test.py
INFO: rkllm-toolkit version: 1.1.2
The argument trust_remote_code is to be used with Auto classes. It has no effect here and is ignored.
Loading checkpoint shards: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [00:03<00:00, 1.21it/s]
Downloading data files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 5577.53it/s]
Extracting data files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 852.15it/s]
Generating train split: 0 examples [00:00, ? examples/s]
ERROR: Catch exception when loading dataset: An error occurred while generating the dataset
Build model failed!

相关代码:

dataset = "/data/rknn-llm/rkllm-toolkit/examples/data_quant.json"
qparams = None
ret = llm.build(do_quantization=True, optimization_level=1, quantized_dtype='w8a8',
quantized_algorithm='normal', target_platform='rk3588', num_npu_core=3, extra_qparams=qparams, dataset=dataset)
if ret != 0:
print('Build model failed!')
exit(ret)

data_quant.json内容:

[{"input":"Human: 你好!\nAssistant: ", "target": "你好!我是人工智能助手KK!"},{"input":"Human: 你可以干什么?\nAssistant: ", "target": "我可以唱跳rap"}]

@waydong
Copy link
Collaborator

waydong commented Nov 18, 2024

hi,我这边无法复现相关问题,您尝试下使用附件中的json,看看是否还有相同问题。
data_test.json

Downloading data files: 100%|███████████████████████████████████████████████████| 1/1 [00:00<00:00, 8388.61it/s]
Extracting data files: 100%|████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1825.99it/s]
Generating train split: 2 examples [00:00, 4.99 examples/s]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants