Skip to content

[LFX Term 1 2026] Restoring LLM Edge Benchmark Suite Single Task Bench#408

Merged
kubeedge-bot merged 1 commit into
kubeedge:mainfrom
NishantSinghhhhh:Restoration-llm-edge-benchmark
May 21, 2026
Merged

[LFX Term 1 2026] Restoring LLM Edge Benchmark Suite Single Task Bench#408
kubeedge-bot merged 1 commit into
kubeedge:mainfrom
NishantSinghhhhh:Restoration-llm-edge-benchmark

Conversation

@NishantSinghhhhh
Copy link
Copy Markdown
Contributor

@NishantSinghhhhh NishantSinghhhhh commented Apr 23, 2026

What type of PR is this?
/kind bug
/kind feature

What this PR does / why we need it:
This PR restores and fixes the llm-edge-benchmark-suite (single_task_bench) so it successfully executes end-to-end within the current Ianvs SingleTaskLearning paradigm.

Previously, the LLM benchmarking pipeline was failing due to missing dependencies, pipeline contract mismatches (missing/strict method signatures), and inaccurate C++ stderr log parsing for latency metrics.

Key changes include:

  • Added Dependencies: Created a requirements.txt to explicitly include llama-cpp-python and other necessary inference packages.
  • Pipeline Contract Alignment: Added preprocess and postprocess methods to LlamaCppModel with optional arguments (data=None, **kwargs) to satisfy the strict signature checks of the Ianvs pipeline without throwing TypeError.

@kubeedge-bot kubeedge-bot added kind/bug Categorizes issue or PR as related to a bug. kind/feature Categorizes issue or PR as related to a new feature. labels Apr 23, 2026
@kubeedge-bot kubeedge-bot requested review from Poorunga and hsj576 April 23, 2026 13:30
@kubeedge-bot kubeedge-bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Apr 23, 2026
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces an LLM edge benchmark suite, adding a requirements file and implementing a base model class. The predict method was refactored to use streaming for measuring prefill latency, and dummy preprocess, postprocess, and train methods were added to satisfy pipeline requirements. A review comment suggests that the train method should return the model path from an instance variable rather than kwargs, as the latter may be empty during execution, leading to an incorrect return value.

Comment thread examples/llm-edge-benchmark-suite/single_task_bench/testalgorithms/basemodel.py Outdated
@NishantSinghhhhh NishantSinghhhhh changed the title feat: add requirements for LLM edge benchmark and enhance LlamaCppMod… [LFX Term 1 2026] Restoring LLM Edge Benchmark Suite Single Task Bench Apr 23, 2026
@NishantSinghhhhh
Copy link
Copy Markdown
Contributor Author

@MooreZheng sir, I have added Readme for LLM Edge Benchmark Suite Single Task Bench, a Requirements.txt and minimal changes in the Basemodel.py to make it work,

Screencast.from.2026-04-23.18-52-16.webm

@NishantSinghhhhh
Copy link
Copy Markdown
Contributor Author

NishantSinghhhhh commented May 7, 2026

  1. Optional pre-Process and Post process
  2. Not changing the indentation
  3. no unnecessary comments
  4. Reasoning for prediction as 0

Copy link
Copy Markdown
Collaborator

@MooreZheng MooreZheng left a comment

Choose a reason for hiding this comment

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

  1. try to make the preprocess optionable to save future burden
  2. check whether there is problem for the prediction fuction. If not, just leave it there.

@NishantSinghhhhh NishantSinghhhhh force-pushed the Restoration-llm-edge-benchmark branch from 4064b41 to 05c26e9 Compare May 12, 2026 08:59
@NishantSinghhhhh
Copy link
Copy Markdown
Contributor Author

@MooreZheng Sir,

Have looked into both questions — here's where things stand:

  1. preprocess : The function needs to stay. The framework calls it unconditionally — SingleTaskLearning invokes job.preprocess() with zero arguments at singletask_learning.py:114, so removing it causes an AttributeError before the pipeline even starts. I've kept it as a minimal pass-through (data=None, **kwargs) so the body is as lightweight as possible. Making it truly optional would require a change in Ianvs core itself.

  2. predict : No structural issues here. Streaming/token accumulation, latency timing, memory capture, and hyperparameters are all working correctly. The one actual bug in the predict path was in _parse_timings: the regex was matching against llama_print_timings:, but modern llama-cpp-python emits llama_perf_context_print: instead — so prefill_latency was silently returning 0. I've widened the regex to cover both patterns; predict itself is otherwise untouched.

Two minor items I left as-is for now:
• data = data[:10] — the hardcoded 10-prompt cap appears intentional
• mem_usage is sampled at end-of-prompt (steady-state), not at peak

@NishantSinghhhhh
Copy link
Copy Markdown
Contributor Author

NishantSinghhhhh commented May 20, 2026

Screencast.from.2026-05-20.16-35-27.webm

The example runs without the pre-process function !!

Copy link
Copy Markdown
Collaborator

@MooreZheng MooreZheng left a comment

Choose a reason for hiding this comment

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

Good! Very close to the final version. Just squash the commit into one and this PR is good to go.

@NishantSinghhhhh NishantSinghhhhh force-pushed the Restoration-llm-edge-benchmark branch from 15a80af to 5170821 Compare May 21, 2026 09:17
Signed-off-by: NishantSinghhhhh <nishantsingh_230137@aitpune.edu.in>
@NishantSinghhhhh NishantSinghhhhh force-pushed the Restoration-llm-edge-benchmark branch from 5170821 to 6f94471 Compare May 21, 2026 09:18
@NishantSinghhhhh
Copy link
Copy Markdown
Contributor Author

@MooreZheng Sir @hsj576 Sir squashed the commits !!

@MooreZheng
Copy link
Copy Markdown
Collaborator

/lgtm

@kubeedge-bot kubeedge-bot added the lgtm Indicates that a PR is ready to be merged. label May 21, 2026
Copy link
Copy Markdown
Member

@hsj576 hsj576 left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link
Copy Markdown
Collaborator

@MooreZheng MooreZheng left a comment

Choose a reason for hiding this comment

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

/approve

@kubeedge-bot
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: hsj576, MooreZheng, NishantSinghhhhh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubeedge-bot kubeedge-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 21, 2026
@kubeedge-bot kubeedge-bot merged commit 29aa49c into kubeedge:main May 21, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/bug Categorizes issue or PR as related to a bug. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants