Skip to content

Commit 1c0a25b

Browse files
authored
add clarify comment for norm eps
1 parent 321d4ed commit 1c0a25b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/mtmd/clip.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -907,6 +907,8 @@ struct clip_graph {
907907

908908
// projector (always using GELU activation)
909909
{
910+
// projector LayerNorm uses pytorch's default eps = 1e-5
911+
// ref: https://huggingface.co/OpenGVLab/InternVL3-8B-Instruct/blob/a34d3e4e129a5856abfd6aa6de79776484caa14e/modeling_internvl_chat.py#L79
910912
cur = build_norm(cur, model.mm_0_w, model.mm_0_b, NORM_TYPE_NORMAL, 1e-5, -1);
911913
cur = ggml_mul_mat(ctx0, model.mm_1_w, cur);
912914
cur = ggml_add(ctx0, cur, model.mm_1_b);

0 commit comments

Comments
 (0)