mirror of
				https://github.com/ggml-org/llama.cpp.git
				synced 2025-10-31 08:51:55 +00:00 
			
		
		
		
	embedding : print all resulting embeddings (#899)
This commit is contained in:
		| @@ -167,9 +167,9 @@ int main(int argc, char ** argv) { | |||||||
|     float * out = emb + p * n_embd; |     float * out = emb + p * n_embd; | ||||||
|     batch_decode(ctx, batch, out, s, n_embd); |     batch_decode(ctx, batch, out, s, n_embd); | ||||||
|  |  | ||||||
|     // print first 3 embeddings |     // print the first part of the embeddings | ||||||
|     fprintf(stdout, "\n"); |     fprintf(stdout, "\n"); | ||||||
|     for (int j = 0; j < std::min(3, n_prompts); j++) { |     for (int j = 0; j < n_prompts; j++) { | ||||||
|         fprintf(stdout, "embedding %d: ", j); |         fprintf(stdout, "embedding %d: ", j); | ||||||
|         for (int i = 0; i < std::min(16, n_embd); i++) { |         for (int i = 0; i < std::min(16, n_embd); i++) { | ||||||
|             fprintf(stdout, "%f ", emb[j * n_embd + i]); |             fprintf(stdout, "%f ", emb[j * n_embd + i]); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Georgi Gerganov
					Georgi Gerganov