meta-llama / llama

Inference code for Llama models
Other
56.08k stars 9.53k forks source link

cannot generate complete sentences #725

Open captiontimo opened 1 year ago

captiontimo commented 1 year ago

when I run example_chat_completion.py --ckpt_dir llama-2-13b-chat --tokenizer_path tokenizer.model --max_seq_len 512

chat is { "role": "user", "content": "Design a script for an advertising video, the product is a new energy vehicle, and it is required to emphasize the advantages of tt he car's long battery life. It is required to design 3 screens and narration."},

answer is `> Assistant: Sure, here's a script for an advertising video for a new energy vehicle, emphasizing the advantages of the car's long battery life.

Screen 1: Introduction

[Opening shot of a busy city street with a sleek, modern electric car driving through the scene]

Narrator (in a cool, upbeat tone): "Are you tired of running out of juice on your daily commute? Do you dream of a car that can keep up with your busy lifestyle without breaking a sweat?"

[Cut to a shot of the car's dashboard, showing the battery level and range]

Narrator: "Introducing the new XYZ Energy Vehicle, with a long-lasting battery that will take you further than ever before."

Screen 2: Battery Life Advantages

[Cut to a shot of the car driving on the highway, with a graphic display of the battery level and range]

Narrator: "Our advanced battery technology allows for a range of up to 500 miles on a single charge, so you can drive all day without worrying about running out of power."

[Cut to a shot of a driver using the car's infotainment system to find charging stations]

Narrator: "And with our intuitive infotainment system, you can easily find charging stations along your route and get back on the road in no time."

Screen 3: Real-Life Scenarios

[Cut to a shot of a driver dropping off kids at school, with a graphic display of the battery level and range]

Narrator: "Imagine being able to drop off the kids at school, go grocery shopping, and pick them up again without worrying about running out of juice."

[Cut to a shot of a driver on a road trip, with a graphic display of the battery level and range]

Narrator: "Or take a road trip without the

==================================`

How can I get the rest of the answers?

EmanuelaBoros commented 1 year ago

Increase max-seq-length to <=4000

captiontimo commented 1 year ago

Increase max-seq-length to <=4000

Out of memory. Is there any other way?

EmanuelaBoros commented 1 year ago

Can you run nvidia-smi? What max-length did you try?

amylinjiang commented 1 year ago

Can you try: --max_seq_len=2560 --max_batch_size=16 or 8?