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

Not getting any output #326

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

Not getting any output #326

Hereux opened this issue Sep 2, 2024 · 0 comments

Comments

@Hereux
Copy link

Hereux commented Sep 2, 2024

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
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