hf bitnet v1

This commit is contained in:
Eddie-Wang1120 2024-06-05 16:15:28 +08:00
parent 3b38d48609
commit 076b4a197b
7 changed files with 897 additions and 3 deletions

7
ggml.h
View file

@ -506,6 +506,8 @@ extern "C" {
GGML_OP_CROSS_ENTROPY_LOSS,
GGML_OP_CROSS_ENTROPY_LOSS_BACK,
GGML_OP_BITLINEAR_QUANT,
GGML_OP_COUNT,
};
@ -993,6 +995,11 @@ extern "C" {
struct ggml_context * ctx,
struct ggml_tensor * a);
// for bitnet
GGML_API struct ggml_tensor * ggml_bitlinear_quant(
struct ggml_context * ctx,
struct ggml_tensor * a);
// argmax along rows
GGML_API struct ggml_tensor * ggml_argmax(
struct ggml_context * ctx,