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

对代码的疑惑 #4

Open
1773226512 opened this issue Nov 6, 2024 · 1 comment
Open

对代码的疑惑 #4

1773226512 opened this issue Nov 6, 2024 · 1 comment

Comments

@1773226512
Copy link

非常感谢您的项目,对我科研有很大的帮助。但是我发现不使用 vllm的情况下,generate_completions中的代码可能有问题,这个代码好像不能发挥原有的功能,可能要改成:


for idx, prediction in enumerate(batch_generations):
            for stop_sequence in stop_id_sequences:
                batch_generations[idx] = prediction.split(stop_sequence)[0]

修改后:


for idx, prediction in enumerate(batch_generations):
            for stop_sequence in stop_id_sequences:
                batch_generations[idx] = batch_generations[idx].split(stop_sequence)[0]
@a1789591
Copy link

Bro, I think you can remove prediction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants