Not getting any output
Opened this issue · 0 comments
Describe the bug
I just started and tried the demo code. The program starts, loads shards but then does nothing. It does nothing, cpu, gpu and ram usages are not changing.
import transformers
import torch
model = "meta-llama/Meta-Llama-3.1-8B-Instruct"
tokenizer = transformers.AutoTokenizer.from_pretrained(model)
pipeline = transformers.pipeline(
"text-generation",
model=model,
torch_dtype=torch.float16,
device_map="auto",
)
sequences = pipeline(
'I have tomatoes, basil and cheese at home. What can I cook for dinner?\n',
do_sample=True,
top_k=10,
num_return_sequences=1,
eos_token_id=tokenizer.eos_token_id,
truncation = True,
max_length=400,
)
for seq in sequences:
print(f"Result: {seq['generated_text']}")```
### Output
C:\Python_Projekte\Persönlich\IHA - Intelligent Home Assistant\TextToSpeech\AI_Thingy>python distilgpt2.py
2024-09-02 20:04:14.462962: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0
.
2024-09-02 20:04:15.449769: I tensorflow/core/util/port.cc:153] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable TF_ENABLE_ONEDNN_OPTS=0
.
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████| 4/4 [00:32<00:00, 8.20s/it]
Setting pad_token_id
to eos_token_id
:128009 for open-end generation.
## Runtime Environment
- Model: `meta-llama-3-8b-instruct`
- Using via huggingface?: yes
- OS: Windows
- GPU VRAM: 16GB
- Number of GPUs: 1
- GPU Make: AMD Radeon 7800XT
**Additional context**
Python 3.11, latest transformers, pytorch