-
Notifications
You must be signed in to change notification settings - Fork 12.4k
Closed
Labels
questionFurther information is requestedFurther information is requested
Description
I am trying to output just the sentence embedding for a given input, instead of any new generated text. I think this should be rather straightforward but figured someone more familiar with the codebase could help me.
I just want to return the sentence embedding vector and stop execution for a given input.
I am almost sure the place where I want to make the embedding is right after norm
but before lm_head
, and I think they will be in inpL
if I run
ggml_build_forward_expand(&gf, inpL);
ggml_graph_compute (ctx0, &gf);
However I am confused by the struct and not sure how to get the sentence embedding itself. I understand it should be some index of ggml_get_data(inpL), but don't get which index, and that is why I come to you. Would anyone lend me a hand?
nanmu42 and loretoparisiben300694
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested