Skip to content

Conversation

cduk
Copy link
Contributor

@cduk cduk commented Oct 13, 2025

--log-disable removes a lot of start-up noise. This is gated via function LOG(). However, in embedding.cpp, this was also used to output the actual embeddings so if --log-disable is used, the embeddings results are suppressed.

This change allows llama-embedding to be used to produce just an embedding output without extraneous startup messages and so can be integrated into scripts.

@cduk cduk requested a review from ggerganov as a code owner October 13, 2025 11:39
@CISC
Copy link
Collaborator

CISC commented Oct 13, 2025

This is the main reason it is still in examples and not in tools, if this is to be promoted to a tool it should have proper output options (raw, json, etc), just changing the LOGs to printf is not enough as the output is truncated.

@cduk
Copy link
Contributor Author

cduk commented Oct 13, 2025

This is the main reason it is still in examples and not in tools, if this is to be promoted to a tool it should have proper output options (raw, json, etc), just changing the LOGs to printf is not enough as the output is truncated.

It already has JSON and array output options.

@CISC
Copy link
Collaborator

CISC commented Oct 13, 2025

This is the main reason it is still in examples and not in tools, if this is to be promoted to a tool it should have proper output options (raw, json, etc), just changing the LOGs to printf is not enough as the output is truncated.

It already has JSON and array output options.

LOL, indeed, I didn't notice that was added already. Those should definitely not be LOGed, the rest is debatable.

@CISC
Copy link
Collaborator

CISC commented Oct 13, 2025

Just to clarify; I think suppressing output when using --log-disable is intended behavior, this is what f.ex. llama-cli does as well. It doesn't make sense to suppress f.ex. requested json output though.

@cduk
Copy link
Contributor Author

cduk commented Oct 13, 2025

Just to clarify; I think suppressing output when using --log-disable is intended behavior, this is what f.ex. llama-cli does as well. It doesn't make sense to suppress f.ex. requested json output though.

From your comments, I think you may be mis-understanding what my patch is actually doing.

@CISC
Copy link
Collaborator

CISC commented Oct 13, 2025

Just to clarify; I think suppressing output when using --log-disable is intended behavior, this is what f.ex. llama-cli does as well. It doesn't make sense to suppress f.ex. requested json output though.

From your comments, I think you may be mis-understanding what my patch is actually doing.

Don't think so, try llama-cli with --log-disable and you'll see what I mean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants