mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-31 08:51:55 +00:00 
			
		
		
		
	model : jina-embeddings-v3 support (#13693)
* initial jina-embeddings-v3 support * initial jina-embeddings-v3 support * initial jina-embeddings-v3 support * fix vocab parsing with only tokenizer.json * set mask token lstrip attribute * additional unk_token_id fallback just in case [no ci] * revert vocab_size() change [no ci] * merge tensor loading into general bert * rope * add lora embedding and loading (non-functional) * export separate lora ggufs instead * add adapter metadata api * use std::string * convert_hf_to_lora compatibility * fix assert * apply suggestions from review * apply suggestion from review
This commit is contained in:
		| @@ -22,6 +22,7 @@ static const std::map<llm_arch, const char *> LLM_ARCH_NAMES = { | ||||
|     { LLM_ARCH_NOMIC_BERT_MOE,   "nomic-bert-moe"   }, | ||||
|     { LLM_ARCH_NEO_BERT,         "neo-bert"         }, | ||||
|     { LLM_ARCH_JINA_BERT_V2,     "jina-bert-v2"     }, | ||||
|     { LLM_ARCH_JINA_BERT_V3,     "jina-bert-v3"     }, | ||||
|     { LLM_ARCH_BLOOM,            "bloom"            }, | ||||
|     { LLM_ARCH_STABLELM,         "stablelm"         }, | ||||
|     { LLM_ARCH_QWEN,             "qwen"             }, | ||||
| @@ -234,8 +235,10 @@ static const std::map<llm_kv, const char *> LLM_KV_NAMES = { | ||||
|     { LLM_KV_TOKENIZER_FIM_REP_ID,           "tokenizer.ggml.fim_rep_token_id"         }, | ||||
|     { LLM_KV_TOKENIZER_FIM_SEP_ID,           "tokenizer.ggml.fim_sep_token_id"         }, | ||||
|  | ||||
|     { LLM_KV_ADAPTER_TYPE,       "adapter.type"       }, | ||||
|     { LLM_KV_ADAPTER_LORA_ALPHA, "adapter.lora.alpha" }, | ||||
|     { LLM_KV_ADAPTER_TYPE,               "adapter.type"               }, | ||||
|     { LLM_KV_ADAPTER_LORA_ALPHA,         "adapter.lora.alpha"         }, | ||||
|     { LLM_KV_ADAPTER_LORA_TASK_NAME,     "adapter.lora.task_name"     }, | ||||
|     { LLM_KV_ADAPTER_LORA_PROMPT_PREFIX, "adapter.lora.prompt_prefix" }, | ||||
|  | ||||
|     // deprecated | ||||
|     { LLM_KV_TOKENIZER_PREFIX_ID, "tokenizer.ggml.prefix_token_id" }, | ||||
| @@ -575,6 +578,20 @@ static const std::map<llm_arch, std::map<llm_tensor, const char *>> LLM_TENSOR_N | ||||
|             { LLM_TENSOR_CLS,             "cls" }, | ||||
|         }, | ||||
|     }, | ||||
|     { | ||||
|         LLM_ARCH_JINA_BERT_V3, | ||||
|         { | ||||
|             { LLM_TENSOR_TOKEN_EMBD,      "token_embd" }, | ||||
|             { LLM_TENSOR_TOKEN_EMBD_NORM, "token_embd_norm" }, | ||||
|             { LLM_TENSOR_TOKEN_TYPES,     "token_types" }, | ||||
|             { LLM_TENSOR_ATTN_OUT_NORM,   "blk.%d.attn_output_norm" }, | ||||
|             { LLM_TENSOR_ATTN_QKV,        "blk.%d.attn_qkv" }, | ||||
|             { LLM_TENSOR_ATTN_OUT,        "blk.%d.attn_output" }, | ||||
|             { LLM_TENSOR_FFN_DOWN,        "blk.%d.ffn_down" }, | ||||
|             { LLM_TENSOR_FFN_UP,          "blk.%d.ffn_up" }, | ||||
|             { LLM_TENSOR_LAYER_OUT_NORM,  "blk.%d.layer_output_norm" }, | ||||
|         }, | ||||
|     }, | ||||
|     { | ||||
|         LLM_ARCH_BLOOM, | ||||
|         { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Sigbjørn Skjæret
					Sigbjørn Skjæret