Skip to content

Commit d18a216

Browse files
committed
Fix embeddings with quantized models
1 parent 82485fd commit d18a216

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clip.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ class CLIPEmbeddings : public GGMLBlock {
546546
int64_t num_positions;
547547

548548
void init_params(struct ggml_context* ctx, std::map<std::string, enum ggml_type>& tensor_types, const std::string prefix = "") {
549-
enum ggml_type token_wtype = (tensor_types.find(prefix + "token_embedding.weight") != tensor_types.end()) ? tensor_types[prefix + "token_embedding.weight"] : GGML_TYPE_F32;
549+
enum ggml_type token_wtype = GGML_TYPE_F32; //(tensor_types.find(prefix + "token_embedding.weight") != tensor_types.end()) ? tensor_types[prefix + "token_embedding.weight"] : GGML_TYPE_F32;
550550
enum ggml_type position_wtype = GGML_TYPE_F32; //(tensor_types.find(prefix + "position_embedding.weight") != tensor_types.end()) ? tensor_types[prefix + "position_embedding.weight"] : GGML_TYPE_F32;
551551

552552
params["token_embedding.weight"] = ggml_new_tensor_2d(ctx, token_wtype, embed_dim, vocab_size);

0 commit comments

Comments
 (0)