Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(cli): add --verbose flag to chat command for detailed usage (#238)#250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ryan-the-crayon merged 7 commits intolmstudio-ai:mainfromYorkieDev:verbose-logging
Jun 20, 2025

Conversation

@YorkieDev
Copy link
Contributor

Summary

Adds a--verbose flag to thelms chat CLI command to improve output visibility and help users debug model behavior in terminal use cases.

This directly addresses issue#238, where users requested better visibility into token-level stats when usinglms chat.


Features

When--verbose is passed, the CLI logs:

  • Stop Reason
  • Tokens per Second
  • Time to First Token
  • GPU Layer Info
  • Prompt / Predicted / Total Token Counts

Example

lms chat -p"Hello world" --verbose

arty-hlr reacted with hooray emojiyagil reacted with rocket emoji
@github-actions
Copy link

github-actionsbot commentedJun 17, 2025
edited
Loading

All contributors have signed the CLA ✍️ ✅
Posted by theCLA Assistant Lite bot.

@YorkieDev
Copy link
ContributorAuthor

I have read the CLA Document and I hereby sign the CLA

@github-actionsgithub-actionsbot added the CLA signedIndicates if all contributors have signed the CLA labelJun 17, 2025
@yagil
Copy link
Member

Thanks for the contribution! 🦾 Can you please show screenshots of what the output looks like when this is used?

@YorkieDev
Copy link
ContributorAuthor

image
image

Think it might need a little polishing to make it better for a release candidate and I need to get-v working but it feels like a good start@yagil

Copy link
Collaborator

@ryan-the-crayonryan-the-crayon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks for the PR! Left a couple comments.

});
}

functiondisplayVerboseStats(stats:any,logger:any){
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Please type those two parameters.

stats should be of typeLLMPredictionStats (from@lmstudio/lms-shared-types)

logger should be of typeSimpleLogger (from@lmstudio/lms-common)

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Actioned.

if(stats.tokensPerSecond!==undefined){
logger.info(` Tokens/Second:${stats.tokensPerSecond.toFixed(2)}`);
}
if(stats.numGpuLayers!==undefined){
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

This stat is currently not populated. Probably hide for now

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Actioned.

short:"s",
description:"Custom system prompt to use for the chat",
}),
verbose:flag({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

--verbose is one of the global flags in lms that enables debugging logging regarding connection, etc. Maybe--stats?

…ve emoji and GPU layers stat- Add proper types for displayVerboseStats function parameters- Rename --verbose flag to --stats to avoid conflict with global verbose flag- Add short flag -t for --stats- Remove emoji from stats output for cleaner appearance- Hide numGpuLayers stat as it's not currently populated
Co-authored-by: Yagil Burowski <yagil@elementlabs.ai>
}),
stats:flag({
long:"stats",
short:"t",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

maybe no short flag for this

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Actioned :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

still here fyi

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

sorted, sorry!

}

functiondisplayVerboseStats(stats:LLMPredictionStats,logger:SimpleLogger){
logger.info("\nPrediction Stats:");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

let's have 2 *\n here to create an empty buffer line

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Actioned :)

@ryan-the-crayonryan-the-crayon merged commit159dff7 intolmstudio-ai:mainJun 20, 2025
1 check passed
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsJun 20, 2025
@ryan-the-crayon
Copy link
Collaborator

Merged. Expecting to ship this in 0.3.17+7. Thanks for the contribution!

Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.

Reviewers

@yagilyagilyagil left review comments

@ryan-the-crayonryan-the-crayonryan-the-crayon approved these changes

Assignees

No one assigned

Labels

CLA signedIndicates if all contributors have signed the CLA

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@YorkieDev@yagil@ryan-the-crayon

[8]ページ先頭

©2009-2025 Movatter.jp