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

raise Exception(f"Unexpected tensor name: {name}") #97

Open
juexing1981 opened this issue Jan 19, 2024 · 2 comments
Open

raise Exception(f"Unexpected tensor name: {name}") #97

juexing1981 opened this issue Jan 19, 2024 · 2 comments

Comments

@juexing1981
Copy link

aaaa@aaaa llama.cpp % python convert.py /Users/aaaa/Documents/yuan2-102B --outtype f16
/Users/aaaa/Documents/Llama/llama.cpp/gguf-py
Loading model file /Users/aaaa/Documents/yuan2-102B/pytorch_model-00001-of-00022.bin
Loading model file /Users/aaaa/Documents/yuan2-102B/pytorch_model-00001-of-00022.bin
Loading model file /Users/aaaa/Documents/yuan2-102B/pytorch_model-00002-of-00022.bin
Loading model file /Users/aaaa/Documents/yuan2-102B/pytorch_model-00003-of-00022.bin
Loading model file /Users/aaaa/Documents/yuan2-102B/pytorch_model-00004-of-00022.bin
Loading model file /Users/aaaa/Documents/yuan2-102B/pytorch_model-00005-of-00022.bin
Loading model file /Users/aaaa/Documents/yuan2-102B/pytorch_model-00006-of-00022.bin
Loading model file /Users/aaaa/Documents/yuan2-102B/pytorch_model-00007-of-00022.bin
Loading model file /Users/aaaa/Documents/yuan2-102B/pytorch_model-00008-of-00022.bin
Loading model file /Users/aaaa/Documents/yuan2-102B/pytorch_model-00009-of-00022.bin
Loading model file /Users/aaaa/Documents/yuan2-102B/pytorch_model-00010-of-00022.bin
Loading model file /Users/aaaa/Documents/yuan2-102B/pytorch_model-00011-of-00022.bin
Loading model file /Users/aaaa/Documents/yuan2-102B/pytorch_model-00012-of-00022.bin
Loading model file /Users/aaaa/Documents/yuan2-102B/pytorch_model-00013-of-00022.bin
Loading model file /Users/aaaa/Documents/yuan2-102B/pytorch_model-00014-of-00022.bin
Loading model file /Users/aaaa/Documents/yuan2-102B/pytorch_model-00015-of-00022.bin
Loading model file /Users/aaaa/Documents/yuan2-102B/pytorch_model-00016-of-00022.bin
Loading model file /Users/aaaa/Documents/yuan2-102B/pytorch_model-00017-of-00022.bin
Loading model file /Users/aaaa/Documents/yuan2-102B/pytorch_model-00018-of-00022.bin
Loading model file /Users/aaaa/Documents/yuan2-102B/pytorch_model-00019-of-00022.bin
Loading model file /Users/aaaa/Documents/yuan2-102B/pytorch_model-00020-of-00022.bin
Loading model file /Users/aaaa/Documents/yuan2-102B/pytorch_model-00021-of-00022.bin
Loading model file /Users/aaaa/Documents/yuan2-102B/pytorch_model-00022-of-00022.bin
params = Params(n_vocab=135040, n_embd=8192, n_layer=84, n_ctx=4096, n_ff=32768, n_head=64, n_head_kv=64, f_norm_eps=1e-06, n_experts=None, n_experts_used=None, rope_scaling_type=None, f_rope_freq_base=None, f_rope_scale=None, n_orig_ctx=None, rope_finetuned=None, ftype=<GGMLFileType.MostlyF16: 1>, path_model=PosixPath('/Users/aaaa/Documents/yuan2-102B'))
Loading vocab file '/Users/aaaa/Documents/yuan2-102B/tokenizer.model', type 'spm'
Permuting layer 0
Permuting layer 1
Permuting layer 2
Permuting layer 3
Permuting layer 4
Permuting layer 5
Permuting layer 6
Permuting layer 7
Permuting layer 8
Permuting layer 9
Permuting layer 10
Permuting layer 11
Permuting layer 12
Permuting layer 13
Permuting layer 14
Permuting layer 15
Permuting layer 16
Permuting layer 17
Permuting layer 18
Permuting layer 19
Permuting layer 20
Permuting layer 21
Permuting layer 22
Permuting layer 23
Permuting layer 24
Permuting layer 25
Permuting layer 26
Permuting layer 27
Permuting layer 28
Permuting layer 29
Permuting layer 30
Permuting layer 31
Permuting layer 32
Permuting layer 33
Permuting layer 34
Permuting layer 35
Permuting layer 36
Permuting layer 37
Permuting layer 38
Permuting layer 39
Permuting layer 40
Permuting layer 41
Permuting layer 42
Permuting layer 43
Permuting layer 44
Permuting layer 45
Permuting layer 46
Permuting layer 47
Permuting layer 48
Permuting layer 49
Permuting layer 50
Permuting layer 51
Permuting layer 52
Permuting layer 53
Permuting layer 54
Permuting layer 55
Permuting layer 56
Permuting layer 57
Permuting layer 58
Permuting layer 59
Permuting layer 60
Permuting layer 61
Permuting layer 62
Permuting layer 63
Permuting layer 64
Permuting layer 65
Permuting layer 66
Permuting layer 67
Permuting layer 68
Permuting layer 69
Permuting layer 70
Permuting layer 71
Permuting layer 72
Permuting layer 73
Permuting layer 74
Permuting layer 75
Permuting layer 76
Permuting layer 77
Permuting layer 78
Permuting layer 79
Permuting layer 80
Permuting layer 81
Permuting layer 82
Permuting layer 83
model.embed_tokens.weight -> token_embd.weight | BF16 | [135040, 8192]
model.layers.0.self_attn.v_proj.weight -> blk.0.attn_v.weight | BF16 | [8192, 8192]
model.layers.0.self_attn.o_proj.weight -> blk.0.attn_output.weight | BF16 | [8192, 8192]
skipping tensor blk.0.attn_rot_embd
Traceback (most recent call last):
File "/Users/aaaa/Documents/Llama/llama.cpp/convert.py", line 1658, in
main(sys.argv[1:]) # Exclude the first element (script name) from sys.argv
^^^^^^^^^^^^^^^^^^
File "/Users/aaaa/Documents/Llama/llama.cpp/convert.py", line 1635, in main
model = convert_model_names(model, params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/aaaa/Documents/Llama/llama.cpp/convert.py", line 1280, in convert_model_names
raise Exception(f"Unexpected tensor name: {name}")
Exception: Unexpected tensor name: model.layers.0.self_attn.lf_gate.conv1.weight

@Shawn-IEITSystems
Copy link
Collaborator

@zhaoxudong01-ieisystem

@chong000
Copy link

@juexing1981 转换hf模型到gguf时会报错,是因为开源项目 llama.cpp/ggml 中暂时还没有我们的模型结构;我们还在适配ggml算子,后面会发出源2.0的ggml版本;

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

3 participants