Skip to content
This repository has been archived by the owner on Aug 30, 2024. It is now read-only.

Commit

Permalink
Update convert_phi.py
Browse files Browse the repository at this point in the history
  • Loading branch information
intellinjun authored Jan 25, 2024
1 parent 1a86d12 commit d624205
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions neural_speed/convert/convert_phi.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,24 +67,14 @@ def phi_convert_gguf(model, tokenizer, dir_model, fname_out, ftype, hparams):
gguf_writer.add_uint32('version', 1)
gguf_writer.add_uint32('n_vocab', hparams["vocab_size"])
gguf_writer.add_embedding_length(hparams["hidden_size"])
gguf_writer.add_uint32('n_mult', 0)
gguf_writer.add_head_count(hparams["num_attention_heads"])
gguf_writer.add_head_count_kv(hparams["num_key_value_heads"])

gguf_writer.add_block_count(hparams["num_hidden_layers"])
gguf_writer.add_rope_dimension_count(n_rot)
gguf_writer.add_uint32('ftype', ftype)
gguf_writer.add_context_length(hparams["max_position_embeddings"])
gguf_writer.add_max_alibi_bias(0)
gguf_writer.add_uint32('clip_qkv', 0)
gguf_writer.add_uint32('par_res', 0)

gguf_writer.add_uint32('word_embed_proj_dim', 0)
gguf_writer.add_uint32('do_layer_norm_before', 0)

gguf_writer.add_uint32('multi_query_group_num', 0)
gguf_writer.add_feed_forward_length(hparams["intermediate_size"])
gguf_writer.add_uint32('inner_hidden_size', 0)

gguf_writer.add_bos_token_id(tokenizer.bos_token_id)
gguf_writer.add_eos_token_id(tokenizer.eos_token_id)
Expand Down

0 comments on commit d624205

Please sign in to comment.