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

Shape of slash mismatch when input batchsize > 1 #53

Open
polarispw opened this issue Jul 23, 2024 · 0 comments
Open

Shape of slash mismatch when input batchsize > 1 #53

polarispw opened this issue Jul 23, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@polarispw
Copy link

polarispw commented Jul 23, 2024

Describe the bug

When evaluating Llama3-8B with Minfer on lm-eval's zero-shot tasks, it went the following error:
图像2024-7-23 10 40
Then I tried to explore the shape inside vertical_and_slash_kernel(q, k, v, vertical_size, slash_size)
图像2024-7-23 10 42

Seems that the batch dim is always 1 in slash?

Steps to reproduce

import lm_eval
from lm_eval.models.huggingface import HFLM
from lm_eval.evaluator import request_caching_arg_to_dict
from lm_eval.tasks import TaskManager
from lm_eval.utils import make_table

from minference import MInference
minference_patch = MInference("minference", args.model)
model = minference_patch(model)

hflm = HFLM(pretrained=model, tokenizer=tokenizer, batch_size=args.zeroshot_bsz)

        manager = TaskManager()
        task_names = manager.match_tasks(args.tasks)
        logging.info(f"Selected Tasks: {task_names}")

        cache_args = request_caching_arg_to_dict(cache_requests=args.cache_processed_data)
        results = lm_eval.simple_evaluate(hflm, tasks=task_names, num_fewshot=0, batch_size=args.zeroshot_bsz, **cache_args)
        logging.info("\n"+make_table(results))
        if "groups" in results:
            logging.info(make_table(results, "groups"))

Above is my script, but I think circumstances with batch > 1 will work

Something about batch was mentioned in ##46.

Expected Behavior

Logs

No response

Additional Information

No response

@polarispw polarispw added the bug Something isn't working label Jul 23, 2024
@polarispw polarispw changed the title Shape of slash_idx is not correct when input batchsize > 1 Shape of slash mismatch when input batchsize > 1 Jul 23, 2024
@iofu728 iofu728 self-assigned this Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants