/home/cfruan/.conda/envs/mlc-source-311/bin/python -m mlc_chat gen_config /models/gemma-2b-it --quantization q0f32 --conv-template gemma_instruction --output /tmp/tmpe_lwnsrp --context-window-size 8192 --prefill-chunk-size 1024 [2024-02-21 23:21:06] INFO auto_config.py:115: Found model configuration: /models/gemma-2b-it/config.json [2024-02-21 23:21:06] INFO auto_config.py:153: Found model type: gemma. Use `--model-type` to override. [2024-02-21 23:21:06] INFO gemma_model.py:55: context_window_size not found in config.json. Falling back to max_position_embeddings (8192) [2024-02-21 23:21:06] INFO gemma_model.py:70: prefill_chunk_size defaults to context_window_size (8192) [2024-02-21 23:21:06] INFO config.py:106: Overriding context_window_size from 8192 to 8192 [2024-02-21 23:21:06] INFO config.py:106: Overriding prefill_chunk_size from 8192 to 1024 [2024-02-21 23:21:06] INFO config.py:106: Overriding max_batch_size from 1 to 80 [2024-02-21 23:21:06] INFO gen_config.py:121: [generation_config.json] Setting bos_token_id: 2 [2024-02-21 23:21:06] INFO gen_config.py:121: [generation_config.json] Setting eos_token_id: 1 [2024-02-21 23:21:06] INFO gen_config.py:121: [generation_config.json] Setting pad_token_id: 0 [2024-02-21 23:21:06] INFO gen_config.py:133: Found tokenizer config: /models/gemma-2b-it/tokenizer.model. Copying to /tmp/tmpe_lwnsrp/tokenizer.model [2024-02-21 23:21:06] INFO gen_config.py:133: Found tokenizer config: /models/gemma-2b-it/tokenizer.json. Copying to /tmp/tmpe_lwnsrp/tokenizer.json [2024-02-21 23:21:06] INFO gen_config.py:135: Not found tokenizer config: /models/gemma-2b-it/vocab.json [2024-02-21 23:21:06] INFO gen_config.py:135: Not found tokenizer config: /models/gemma-2b-it/merges.txt [2024-02-21 23:21:06] INFO gen_config.py:135: Not found tokenizer config: /models/gemma-2b-it/added_tokens.json [2024-02-21 23:21:06] INFO gen_config.py:133: Found tokenizer config: /models/gemma-2b-it/tokenizer_config.json. Copying to /tmp/tmpe_lwnsrp/tokenizer_config.json [2024-02-21 23:21:06] INFO gen_config.py:74: [System default] Setting temperature: 0.7 [2024-02-21 23:21:06] INFO gen_config.py:74: [System default] Setting presence_penalty: 0.0 [2024-02-21 23:21:06] INFO gen_config.py:74: [System default] Setting frequency_penalty: 0.0 [2024-02-21 23:21:06] INFO gen_config.py:74: [System default] Setting repetition_penalty: 1.0 [2024-02-21 23:21:06] INFO gen_config.py:74: [System default] Setting top_p: 0.95 [2024-02-21 23:21:06] INFO gen_config.py:74: [System default] Setting mean_gen_len: 128 [2024-02-21 23:21:06] INFO gen_config.py:74: [System default] Setting max_gen_len: 512 [2024-02-21 23:21:06] INFO gen_config.py:74: [System default] Setting shift_fill_factor: 0.3 [2024-02-21 23:21:06] INFO gen_config.py:186: Dumping configuration file to: /tmp/tmpe_lwnsrp/mlc-chat-config.json /home/cfruan/.conda/envs/mlc-source-311/bin/python -m mlc_chat convert_weight /models/gemma-2b-it --quantization q0f32 --source-format auto --output /tmp/tmpe_lwnsrp [2024-02-21 23:21:08] INFO auto_config.py:115: Found model configuration: /models/gemma-2b-it/config.json [2024-02-21 23:21:09] INFO auto_device.py:76: Found device: cuda:0 [2024-02-21 23:21:09] INFO auto_device.py:76: Found device: cuda:1 [2024-02-21 23:21:10] INFO auto_device.py:85: Not found device: rocm:0 [2024-02-21 23:21:11] INFO auto_device.py:85: Not found device: metal:0 [2024-02-21 23:21:21] INFO auto_device.py:76: Found device: vulkan:0 [2024-02-21 23:21:21] INFO auto_device.py:76: Found device: vulkan:1 [2024-02-21 23:21:21] INFO auto_device.py:76: Found device: vulkan:2 [2024-02-21 23:21:23] INFO auto_device.py:85: Not found device: opencl:0 [2024-02-21 23:21:23] INFO auto_device.py:33: Using device: cuda:0 [2024-02-21 23:21:23] INFO auto_weight.py:70: Finding weights in: /models/gemma-2b-it [2024-02-21 23:21:23] INFO auto_weight.py:136: Not found Huggingface PyTorch [2024-02-21 23:21:23] INFO auto_weight.py:143: Found source weight format: huggingface-safetensor. Source configuration: /models/gemma-2b-it/model.safetensors.index.json [2024-02-21 23:21:23] INFO auto_weight.py:106: Using source weight configuration: /models/gemma-2b-it/model.safetensors.index.json. Use `--source` to override. [2024-02-21 23:21:23] INFO auto_weight.py:110: Using source weight format: huggingface-safetensor. Use `--source-format` to override. [2024-02-21 23:21:23] INFO auto_config.py:153: Found model type: gemma. Use `--model-type` to override. [2024-02-21 23:21:23] INFO gemma_model.py:55: context_window_size not found in config.json. Falling back to max_position_embeddings (8192) [2024-02-21 23:21:23] INFO gemma_model.py:70: prefill_chunk_size defaults to context_window_size (8192) Weight conversion with arguments: --config /models/gemma-2b-it/config.json --quantization NoQuantize(name='q0f32', kind='no-quant', model_dtype='float32') --model-type gemma --device cuda:0 --source /models/gemma-2b-it/model.safetensors.index.json --source-format huggingface-safetensor --output /tmp/tmpe_lwnsrp 0%| | 0/110 [00:00 type is zero. setattr(self, word, getattr(machar, word).flat[0]) /home/cfruan/.conda/envs/mlc-source-311/lib/python3.11/site-packages/numpy/core/getlimits.py:89: UserWarning: The value of the smallest subnormal for type is zero. return self._float_to_str(self.smallest_subnormal) Start storing to cache /tmp/tmpe_lwnsrp [0001/0110] saving model.embed_tokens.weight [0002/0110] saving model.layers.0.input_layernorm.weight [0003/0110] saving model.layers.0.mlp.down_proj.weight [0004/0110] saving model.layers.0.mlp.gate_up_proj.weight [0005/0110] saving model.layers.0.post_attention_layernorm.weight [0006/0110] saving model.layers.0.self_attn.qkv_proj.weight [0007/0110] saving model.layers.0.self_attn.o_proj.weight [0008/0110] saving model.layers.1.input_layernorm.weight [0009/0110] saving model.layers.1.mlp.down_proj.weight [0010/0110] saving model.layers.1.mlp.gate_up_proj.weight [0011/0110] saving model.layers.1.post_attention_layernorm.weight [0012/0110] saving model.layers.1.self_attn.qkv_proj.weight [0013/0110] saving model.layers.1.self_attn.o_proj.weight [0014/0110] saving model.layers.10.input_layernorm.weight [0015/0110] saving model.layers.10.mlp.down_proj.weight [0016/0110] saving model.layers.10.mlp.gate_up_proj.weight [0017/0110] saving model.layers.10.post_attention_layernorm.weight [0018/0110] saving model.layers.10.self_attn.qkv_proj.weight [0019/0110] saving model.layers.10.self_attn.o_proj.weight [0020/0110] saving model.layers.11.input_layernorm.weight [0021/0110] saving model.layers.11.mlp.down_proj.weight [0022/0110] saving model.layers.11.mlp.gate_up_proj.weight [0023/0110] saving model.layers.11.post_attention_layernorm.weight [0024/0110] saving model.layers.11.self_attn.qkv_proj.weight [0025/0110] saving model.layers.11.self_attn.o_proj.weight [0026/0110] saving model.layers.12.input_layernorm.weight [0027/0110] saving model.layers.12.mlp.down_proj.weight [0028/0110] saving model.layers.12.mlp.gate_up_proj.weight [0029/0110] saving model.layers.12.post_attention_layernorm.weight [0030/0110] saving model.layers.12.self_attn.qkv_proj.weight [0031/0110] saving model.layers.12.self_attn.o_proj.weight [0032/0110] saving model.layers.13.input_layernorm.weight [0033/0110] saving model.layers.13.mlp.down_proj.weight [0034/0110] saving model.layers.13.mlp.gate_up_proj.weight [0035/0110] saving model.layers.13.post_attention_layernorm.weight [0036/0110] saving model.layers.13.self_attn.qkv_proj.weight [0037/0110] saving model.layers.13.self_attn.o_proj.weight [0038/0110] saving model.layers.14.input_layernorm.weight [0039/0110] saving model.layers.14.mlp.down_proj.weight [0040/0110] saving model.layers.14.mlp.gate_up_proj.weight [0041/0110] saving model.layers.14.post_attention_layernorm.weight [0042/0110] saving model.layers.14.self_attn.qkv_proj.weight [0043/0110] saving model.layers.14.self_attn.o_proj.weight [0044/0110] saving model.layers.15.input_layernorm.weight [0045/0110] saving model.layers.15.mlp.down_proj.weight [0046/0110] saving model.layers.15.mlp.gate_up_proj.weight [0047/0110] saving model.layers.15.post_attention_layernorm.weight [0048/0110] saving model.layers.15.self_attn.qkv_proj.weight [0049/0110] saving model.layers.15.self_attn.o_proj.weight [0050/0110] saving model.layers.16.input_layernorm.weight [0051/0110] saving model.layers.16.mlp.down_proj.weight [0052/0110] saving model.layers.16.mlp.gate_up_proj.weight [0053/0110] saving model.layers.16.post_attention_layernorm.weight [0054/0110] saving model.layers.16.self_attn.qkv_proj.weight [0055/0110] saving model.layers.16.self_attn.o_proj.weight [0056/0110] saving model.layers.17.mlp.gate_up_proj.weight [0057/0110] saving model.layers.17.self_attn.qkv_proj.weight [0058/0110] saving model.layers.17.self_attn.o_proj.weight [0059/0110] saving model.layers.2.input_layernorm.weight [0060/0110] saving model.layers.2.mlp.down_proj.weight [0061/0110] saving model.layers.2.mlp.gate_up_proj.weight [0062/0110] saving model.layers.2.post_attention_layernorm.weight [0063/0110] saving model.layers.2.self_attn.qkv_proj.weight [0064/0110] saving model.layers.2.self_attn.o_proj.weight [0065/0110] saving model.layers.3.input_layernorm.weight[2024-02-21 23:22:56] INFO convert_weight.py:154: Saved to directory: /tmp/tmpe_lwnsrp [0066/0110] saving model.layers.3.mlp.down_proj.weight [0067/0110] saving model.layers.3.mlp.gate_up_proj.weight [0068/0110] saving model.layers.3.post_attention_layernorm.weight [0069/0110] saving model.layers.3.self_attn.qkv_proj.weight [0070/0110] saving model.layers.3.self_attn.o_proj.weight [0071/0110] saving model.layers.4.input_layernorm.weight [0072/0110] saving model.layers.4.mlp.down_proj.weight [0073/0110] saving model.layers.4.mlp.gate_up_proj.weight [0074/0110] saving model.layers.4.post_attention_layernorm.weight [0075/0110] saving model.layers.4.self_attn.qkv_proj.weight [0076/0110] saving model.layers.4.self_attn.o_proj.weight [0077/0110] saving model.layers.5.input_layernorm.weight [0078/0110] saving model.layers.5.mlp.down_proj.weight [0079/0110] saving model.layers.5.mlp.gate_up_proj.weight [0080/0110] saving model.layers.5.post_attention_layernorm.weight [0081/0110] saving model.layers.5.self_attn.qkv_proj.weight [0082/0110] saving model.layers.5.self_attn.o_proj.weight [0083/0110] saving model.layers.6.input_layernorm.weight [0084/0110] saving model.layers.6.mlp.down_proj.weight [0085/0110] saving model.layers.6.mlp.gate_up_proj.weight [0086/0110] saving model.layers.6.post_attention_layernorm.weight [0087/0110] saving model.layers.6.self_attn.qkv_proj.weight [0088/0110] saving model.layers.6.self_attn.o_proj.weight [0089/0110] saving model.layers.7.input_layernorm.weight [0090/0110] saving model.layers.7.mlp.down_proj.weight [0091/0110] saving model.layers.7.mlp.gate_up_proj.weight [0092/0110] saving model.layers.7.post_attention_layernorm.weight [0093/0110] saving model.layers.7.self_attn.qkv_proj.weight [0094/0110] saving model.layers.7.self_attn.o_proj.weight [0095/0110] saving model.layers.8.input_layernorm.weight [0096/0110] saving model.layers.8.mlp.down_proj.weight [0097/0110] saving model.layers.8.mlp.gate_up_proj.weight [0098/0110] saving model.layers.8.post_attention_layernorm.weight [0099/0110] saving model.layers.8.self_attn.qkv_proj.weight [0100/0110] saving model.layers.8.self_attn.o_proj.weight [0101/0110] saving model.layers.9.input_layernorm.weight [0102/0110] saving model.layers.9.mlp.down_proj.weight [0103/0110] saving model.layers.9.mlp.gate_up_proj.weight [0104/0110] saving model.layers.9.post_attention_layernorm.weight [0105/0110] saving model.layers.9.self_attn.qkv_proj.weight [0106/0110] saving model.layers.9.self_attn.o_proj.weight [0107/0110] saving model.layers.17.input_layernorm.weight [0108/0110] saving model.layers.17.mlp.down_proj.weight [0109/0110] saving model.layers.17.post_attention_layernorm.weight [0110/0110] saving model.norm.weight All finished, 49 total shards committed, record saved to /tmp/tmpe_lwnsrp/ndarray-cache.json Also saved a bf16 record to /tmp/tmpe_lwnsrp/ndarray-cache-b16.json