mtmd: add clip_graph::build_mm() (#20751)
* clip: add build_mm() * apply to all models * add TODO for bias overload
This commit is contained in:
@@ -41,6 +41,11 @@ struct clip_graph {
|
||||
virtual ~clip_graph() = default;
|
||||
virtual ggml_cgraph * build() = 0;
|
||||
|
||||
// wrapper around ggml_mul_mat, allow hooking (e.g. LoRA, clamping) depending on the model
|
||||
// tensor w should be the weight matrix, and tensor x should be the input
|
||||
virtual ggml_tensor * build_mm(ggml_tensor * w, ggml_tensor * x) const;
|
||||
// TODO: build_mm(w, b, x) to support bias
|
||||
|
||||
//
|
||||
// utility functions
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user