Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/model/common/ggml_block.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ class Linear : public UnaryBlock {
__STATIC_INLINE__ bool support_get_rows(ggml_type wtype) {
switch (wtype) {
case GGML_TYPE_F16:
case GGML_TYPE_BF16:
case GGML_TYPE_Q8_0:
case GGML_TYPE_Q5_1:
case GGML_TYPE_Q5_0:
Expand Down
4 changes: 4 additions & 0 deletions src/model/te/clip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ class CLIPEmbeddings : public GGMLBlock {
params["position_embedding.weight"] = ggml_new_tensor_2d(ctx, position_wtype, embed_dim, num_positions);
}

enum ggml_op param_usage_op(const std::string& name) const override {
return name == "token_embedding.weight" ? GGML_OP_GET_ROWS : GGML_OP_NONE;
}

public:
CLIPEmbeddings(int64_t embed_dim,
int64_t vocab_size = 49408,
Expand Down
Loading