Text Generation
Transformers
PyTorch
mosaic_gpt
custom_code

Was trying the model . getting errors . May be I am doing something wrong. Please share complete code.

#1
by smjain - opened

inputs = tokenizer(["Tell me about Obama"], return_tensors="pt")
inputs=inputs.to(device='cuda:0')

Example 1: Print the scores for each token generated with Greedy Search

outputs = model.generate(**inputs, max_new_tokens=100, return_dict_in_generate=True, output_scores=True)
Results in error
RuntimeError: Triton Error [CUDA]: invalid argument

Hi, could you share the output of pip list? likely you have an incompatible version of something

inputs = tokenizer(["Tell me about Obama"], return_tensors="pt")
inputs=inputs.to(device='cuda:0')

Example 1: Print the scores for each token generated with Greedy Search

outputs = model.generate(**inputs, max_new_tokens=100, return_dict_in_generate=True, output_scores=True)
Results in error
RuntimeError: Triton Error [CUDA]: invalid argument

Here's a small colab that works: https://colab.research.google.com/drive/19YGJ-eDe2Wm17hc9hLwobckHZjFB8lo5?usp=sharing

inputs = tokenizer(["Tell me about Obama"], return_tensors="pt")
inputs=inputs.to(device='cuda:0')

Example 1: Print the scores for each token generated with Greedy Search

outputs = model.generate(**inputs, max_new_tokens=100, return_dict_in_generate=True, output_scores=True)
Results in error
RuntimeError: Triton Error [CUDA]: invalid argument

Here's a small colab that works: https://colab.research.google.com/drive/19YGJ-eDe2Wm17hc9hLwobckHZjFB8lo5?usp=sharing

Thanks. This works.

Sign up or log in to comment