Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ensure initial propmpt is long for perf metrics tests #1471

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pavel-esir
Copy link
Contributor

Fix test from #1414
Ticket CVS-155098

@pavel-esir pavel-esir added this to the 2025.0 milestone Jan 3, 2025
@github-actions github-actions bot added the category: LLM LLM pipeline (stateful, static) label Jan 3, 2025
@@ -586,7 +586,8 @@ def run_perf_metrics_collection(model_descr, generation_config: Dict, prompt: st
def test_perf_metrics(model_descr, generation_config, prompt):
import time
start_time = time.perf_counter()
perf_metrics = run_perf_metrics_collection(read_model(model_descr), generation_config, prompt)
# To ensure the prefill stage takes much more time make initial prompt long.
perf_metrics = run_perf_metrics_collection(read_model(model_descr), generation_config, prompt * 200)
total_time = (time.perf_counter() - start_time) * 1000
Copy link
Contributor

@ilya-lavrenov ilya-lavrenov Jan 4, 2025

Choose a reason for hiding this comment

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

in general, assumptions about perf metrics like assert load_time < 1000.0 should not be in tests, because depending on machine / network stability load_time may significantly vary

fixed it here #1478 (comment)

@@ -586,7 +586,8 @@ def run_perf_metrics_collection(model_descr, generation_config: Dict, prompt: st
def test_perf_metrics(model_descr, generation_config, prompt):
import time
start_time = time.perf_counter()
perf_metrics = run_perf_metrics_collection(read_model(model_descr), generation_config, prompt)
# To ensure the prefill stage takes much more time make initial prompt long.
perf_metrics = run_perf_metrics_collection(read_model(model_descr), generation_config, prompt * 200)
Copy link
Contributor

Choose a reason for hiding this comment

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

I suppose it's more clear to extend prompt where it's initially created:

    (dict(max_new_tokens=20), 'table is made of' * 200),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: LLM LLM pipeline (stateful, static)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants