allenai / allenai/lumos

The iterative planner returns empty string

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
477
Forks
34
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.