ggml-org/llama.cpp
convert.py incorrectly detects LLaMAv1 65B as a LLaMAv2 model
Geschlossen
#3.326 geöffnet am 24.09.2023
good first issue
Repository-Metriken
- Stars
- (124.134 Sterne)
- PR-Merge-Metriken
- (Durchschn. Merge 6T 8h) (389 gemergte PRs in 30 T)
Beschreibung
Expected Behavior
When converting LLaMA v1 65B, the model should be correctly detected as v1 and the max ctx should be set to 2048.
Current Behavior
convert.py seems to use the norm_eps value to detect if a model is v1 or v2.
I am using the original facebook PTH files as a source for the conversion, and it seems like the v1 65B model has the same eps as the v2 70B one, which means it gets mis-detected as a v2 model.
The same difference is present in the config for the HF transformer JSON, at least the one on Huggingface.
Steps to Reproduce
- Convert LLaMA v1 65B from source PTH files using
./convert.py - Check the
general.namefield in the metadata of the resulting GGUF file
Failure Logs
llm_load_print_meta: format = GGUF V2 (latest)
llm_load_print_meta: arch = llama
llm_load_print_meta: vocab type = SPM
llm_load_print_meta: n_vocab = 32000
llm_load_print_meta: n_merges = 0
llm_load_print_meta: n_ctx_train = 4096
llm_load_print_meta: n_ctx = 512
llm_load_print_meta: n_embd = 8192
llm_load_print_meta: n_head = 64
llm_load_print_meta: n_head_kv = 64
llm_load_print_meta: n_layer = 80
llm_load_print_meta: n_rot = 128
llm_load_print_meta: n_gqa = 1
llm_load_print_meta: f_norm_eps = 0.0e+00
llm_load_print_meta: f_norm_rms_eps = 1.0e-05
llm_load_print_meta: n_ff = 22016
llm_load_print_meta: freq_base = 10000.0
llm_load_print_meta: freq_scale = 1
llm_load_print_meta: model type = 65B
llm_load_print_meta: model ftype = mostly F16
llm_load_print_meta: model params = 65.29 B
llm_load_print_meta: model size = 121.61 GiB (16.00 BPW)
llm_load_print_meta: general.name = LLaMA v2
llm_load_print_meta: BOS token = 1 '<s>'
llm_load_print_meta: EOS token = 2 '</s>'
llm_load_print_meta: UNK token = 0 '<unk>'
llm_load_print_meta: LF token = 13 '<0x0A>'