Skip to content

Add prompt_to_lora_id_mapping adjustment in fix_prompts() on release/v1.19 #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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

quic-jouachen
Copy link
Contributor

@quic-jouachen quic-jouachen commented Jan 27, 2025

Same as PR#242

This is regarding the issue reported in issue#251

The finite lorax feature failed to execute when the number of prompts provided is less than the full batch size. The solution involves applying the same adjustment strategy for prompt_to_lora_id_mapping as used for prompt in the fix_prompts() function located in QEfficient/generation/text_generation_inference.py.

@quic-jouachen quic-jouachen force-pushed the finitelorax_fixprompts_fix_rel1.19 branch 2 times, most recently from 88a6eb9 to 2447937 Compare January 27, 2025 22:22
@quic-jouachen quic-jouachen force-pushed the finitelorax_fixprompts_fix_rel1.19 branch 3 times, most recently from ab4c6fb to bd54026 Compare January 29, 2025 01:27
@quic-jouachen quic-jouachen force-pushed the finitelorax_fixprompts_fix_rel1.19 branch from bd54026 to e146e06 Compare January 29, 2025 02:27
@quic-rishinr quic-rishinr added the in-review Review process is ongoing label Jan 31, 2025
@@ -311,7 +332,7 @@ def cloud_ai_100_exec_kv(
"""
batch_size, ctx_len, full_batch_size = get_compilation_dims(qpc_path)
prompt: List[str] = get_input_prompts(prompt, prompts_txt_file_path)
prompt = fix_prompts(prompt, batch_size, full_batch_size)
prompt, prompt_to_lora_id_mapping = fix_prompts(prompt, batch_size, prompt_to_lora_id_mapping, full_batch_size)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should separate the function to fix prompt_to_lora_id_mapping and call it only when it's value is other than None.
For this release branch this is okay. But for Mainline let's change it.

Signed-off-by: Onkar Chougule <[email protected]>
@quic-rishinr quic-rishinr merged commit daaf0af into quic:release/v1.19 Jan 31, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix in-review Review process is ongoing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants