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

The iterative planner returns empty string #7

Open
hadifar opened this issue Sep 2, 2024 · 0 comments
Open

The iterative planner returns empty string #7

hadifar opened this issue Sep 2, 2024 · 0 comments

Comments

@hadifar
Copy link

hadifar commented Sep 2, 2024

First of all thanks for your releasing the code.

I'm trying to play with the planner module. However, I'm not able to generate plans using lumos_complex_qa_plan_iterative.
I already used the lumos_complex_qa_plan_onetime and it did work perfectly.

Here is the code:

from transformers import pipeline
import transformers
import torch

model_id = "ai2lumos/lumos_complex_qa_plan_iterative"
# works--> ai2lumos/lumos_complex_qa_plan_onetime

pipeline = transformers.pipeline(
    "text-generation",
    model=model_id,
    model_kwargs={"torch_dtype": torch.bfloat16},
    device_map="auto",
)

print("-"*50)
print("-"*50)
q_list = [
      "What year did Guns N Roses perform a promo for a movie starring Arnold Schwarzenegger as a former New York Police detective?"
]

for q in q_list:
        messages = 	[{ "role": "user", "content": f"Please provide a reasonable subgoal-based plan to solve the given task.\nTask: {q}; Initial Environment Description: None." } ]
        outputs = pipeline(
            messages,
            max_new_tokens=512,
        )
        print(outputs)

Do you know by chance how can I fix the issue?

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

1 participant