You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
importtransformersimporttorchmodel="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,
)
forseqinsequences:
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
The text was updated successfully, but these errors were encountered:
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.
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
toeos_token_id
:128009 for open-end generation.The text was updated successfully, but these errors were encountered: