Open maxruby opened 1 day ago
Hi, try activating the environment through the terminal and enter the following commands:
Activate the environment: .\venv-ui\Scripts\activate
Set the following environment variables: set CUDA_LAUNCH_BLOCKING=1 SET TORCH_USE_CUDA_DSA=1
After that, try running the script again.
Thanks a lot for your quick feedback!
Here is the output I get after following your instructions:
$ python clean-ui.py
2024-10-01 22:08:54.936544: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
Select a model to load:
1. Llama-3.2-11B-Vision-Instruct-bnb-4bit
2. Molmo-7B-D-bnb-4bit
Enter the number of the model you want to use: 1
config.json: 100%|██████████████████████████████████████████████████████████████████| 5.64k/5.64k [00:00<00:00, 22.3MB/s]
Unused kwargs: ['_load_in_4bit', '_load_in_8bit', 'quant_method']. These kwargs are not used in <class 'transformers.utils.quantization_config.BitsAndBytesConfig'>.
model.safetensors.index.json: 100%|███████████████████████████████████████████████████| 385k/385k [00:00<00:00, 16.5MB/s]
model-00001-of-00002.safetensors: 100%|█████████████████████████████████████████████| 5.00G/5.00G [01:07<00:00, 74.6MB/s]
model-00002-of-00002.safetensors: 100%|█████████████████████████████████████████████| 2.18G/2.18G [00:30<00:00, 71.5MB/s]
Downloading shards: 100%|██████████████████████████████████████████████████████████████████| 2/2 [01:38<00:00, 49.02s/it]
The model weights are not tied. Please use the `tie_weights` method before using the `infer_auto_device` function.
Loading checkpoint shards: 100%|███████████████████████████████████████████████████████████| 2/2 [00:01<00:00, 1.24it/s]
generation_config.json: 100%|███████████████████████████████████████████████████████████| 210/210 [00:00<00:00, 1.39MB/s]
preprocessor_config.json: 100%|█████████████████████████████████████████████████████████| 477/477 [00:00<00:00, 4.12MB/s]
tokenizer_config.json: 100%|████████████████████████████████████████████████████████| 55.9k/55.9k [00:00<00:00, 10.4MB/s]
tokenizer.json: 100%|███████████████████████████████████████████████████████████████| 17.2M/17.2M [00:00<00:00, 82.5MB/s]
special_tokens_map.json: 100%|██████████████████████████████████████████████████████████| 454/454 [00:00<00:00, 4.33MB/s]
chat_template.json: 100%|███████████████████████████████████████████████████████████████| 558/558 [00:00<00:00, 11.9MB/s]
Running on local URL: http://127.0.0.1:7860
To create a public link, set `share=True` in `launch()`.
Traceback (most recent call last):
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/gradio/queueing.py", line 536, in process_events
response = await route_utils.call_process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/gradio/route_utils.py", line 322, in call_process_api
output = await app.get_blocks().process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/gradio/blocks.py", line 1935, in process_api
result = await self.call_function(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/gradio/blocks.py", line 1520, in call_function
prediction = await anyio.to_thread.run_sync( # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2405, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 914, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/gradio/utils.py", line 826, in wrapper
response = f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/clean-ui.py", line 56, in describe_image
output = model.generate(
^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/transformers/generation/utils.py", line 2048, in generate
result = self._sample(
^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/transformers/generation/utils.py", line 3008, in _sample
outputs = self(**model_inputs, return_dict=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/accelerate/hooks.py", line 170, in new_forward
output = module._old_forward(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/transformers/models/mllama/modeling_mllama.py", line 2188, in forward
outputs = self.language_model(
^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/transformers/models/mllama/modeling_mllama.py", line 1929, in forward
outputs = self.model(
^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/transformers/models/mllama/modeling_mllama.py", line 1729, in forward
layer_outputs = decoder_layer(
^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/accelerate/hooks.py", line 170, in new_forward
output = module._old_forward(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/transformers/models/mllama/modeling_mllama.py", line 1006, in forward
hidden_states, attn_weights, past_key_value = self.cross_attn(
^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/torch/nn/modules/module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/accelerate/hooks.py", line 170, in new_forward
output = module._old_forward(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/transformers/models/mllama/modeling_mllama.py", line 630, in forward
raise ValueError(
ValueError: Cross attention layer can't find neither `cross_attn_states` nor cached values for key/values!
Are you encountering the same error with the Molmo model as shown in the screenshot?
It seems that the required parameters were not set through the environment variables. To resolve this, you need to adjust the script as follows:
First, add the following code:
import os
os.environ['CUDA_LAUNCH_BLOCKING'] = "1"
import torch
Make sure that the os.environ['CUDA_LAUNCH_BLOCKING'] line comes before the torch import.
After all imports, include this line:
os.environ['TORCH_USE_CUDA_DSA'] = "1"
Are you encountering the same error with the Molmo model as shown in the screenshot? Yes
Thanks again for your quick reply and suggestions.
I added the os.environ assignments as you suggested to the python file.
The values can be confirmed in the printout during the execution of the script.
However, the results for molmo-7b are again not successful "RuntimeError: probability tensor contains either inf
, nan
or element < 0". See further below for details.
Not sure if its helpful to resolve this, but our server has CUDA version 12.2 but I am using pytorch 12.1 - though my understanding is this should not be an issue.
GPU | Name | Persistence-M | Bus-Id | Disp.A | Volatile Uncorr. ECC | Fan | Temp | Perf | Pwr:Usage/Cap | Memory-Usage | GPU-Util | Compute M. | MIG M. |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | NVIDIA RTX A5000 | On | 00000000:01:00.0 | Off | Off | 30% | 39C | P8 | 23W / 230W | 12MiB / 24564MiB | 0% | Default | N/A |
1 | NVIDIA RTX A5000 | On | 00000000:61:00.0 | Off | Off | 30% | 35C | P8 | 16W / 230W | 84MiB / 24564MiB | 0% | Default | N/A |
Regarding this being due to insufficient GPU VRAM, I suppose this seems unlikely on paper because I am able to do inference without trouble using the following models on the same system via ollama. According to https://huggingface.co/spaces/hf-accelerate/model-memory-usage, the molmo-7b 4-bit should only need maximum 7-10 GB VRAM....
Model
arch llama
parameters 70.6B
quantization Q4_0
context length 131072
embedding length 8192
qwen2.5:72b-instruct (47 GB VRAM)
Model
arch qwen2
parameters 72.7B
quantization Q4_K_M
context length 32768
embedding length 8192
$ python clean-ui.py
2024-10-01 23:58:16.277979: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
Select a model to load:
1. Llama-3.2-11B-Vision-Instruct-bnb-4bit
2. Molmo-7B-D-bnb-4bit
PYTORCH_USE_CUDA_DSA: 1
CUDA_LAUNC_BLOCKING: 1
Enter the number of the model you want to use: 1
Unused kwargs: ['_load_in_4bit', '_load_in_8bit', 'quant_method']. These kwargs are not used in <class 'transformers.utils.quantization_config.BitsAndBytesConfig'>.
The model weights are not tied. Please use the `tie_weights` method before using the `infer_auto_device` function.
Loading checkpoint shards: 100%|███████████████████████████████████████████████████████████| 2/2 [00:01<00:00, 1.24it/s]
Running on local URL: http://127.0.0.1:7860
To create a public link, set `share=True` in `launch()`.
Traceback (most recent call last):
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/gradio/queueing.py", line 536, in process_events
response = await route_utils.call_process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/gradio/route_utils.py", line 322, in call_process_api
output = await app.get_blocks().process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/gradio/blocks.py", line 1935, in process_api
result = await self.call_function(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/gradio/blocks.py", line 1520, in call_function
prediction = await anyio.to_thread.run_sync( # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2405, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 914, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/gradio/utils.py", line 826, in wrapper
response = f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/clean-ui.py", line 62, in describe_image
output = model.generate(
^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/transformers/generation/utils.py", line 2048, in generate
result = self._sample(
^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/transformers/generation/utils.py", line 3044, in _sample
next_tokens = torch.multinomial(probs, num_samples=1).squeeze(1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: probability tensor contains either `inf`, `nan` or element < 0
If there were no dependency conflict messages during package installation from the requirements.txt, everything should function properly. The key is ensuring that Torch is installed and compiled with CUDA (cuDNN).
Simply installing CUDA separately along with Torch won’t work correctly.
You can check by running the command pip list
to see if Torch is installed with or without cuDNN.
Just don't forget to activate the environment .\venv-ui\Scripts\activate
Thanks again for the quick feedback.
Actually, I am not sure that the problem is simply not having Torch properly compiled with CUDA or unavailable cuDNN. I now checked carefully how CUDA and cuDNN are installed on Ubuntu 22.04 as well the output of torch in the python 3.11 runtime.
or do you still believe I need to build PyTorch from source with CUDA 12.2 on Ubuntu 22.04?
Here is how I checked:
import torch
print('CUDA available', torch.cuda.is_available())
print('CUDA version', torch.version.cuda)
print('cuDNN enabled', torch.backends.cudnn.enabled)
print('cuDNN version', torch.backends.cudnn.version())
print('Torch version', torch.__version__)
n_cuda_devices = torch.cuda.device_count()
print('CUDA devices', n_cuda_devices)
for i in range(n_cuda_devices):
print(f'Device {i} name:', torch.cuda.get_device_name(i))
print('Generate a tensor filled with random numbers using CUDA')
if torch.cuda.is_available():
x = torch.randn(3, 3)
x = x.to('cuda')
print(x)
# Results on 02.10.2024 11:42
# CUDA available True
# CUDA version 12.1
# cuDNN enabled True
# cuDNN version 90100
# Torch version 2.4.1+cu121
# CUDA devices 2
# Device 0 name: NVIDIA RTX A5000
# Device 1 name: NVIDIA RTX A5000
# Generate a tensor filled with random numbers using CUDA
# tensor([[-0.4473, -0.1843, 0.7862],
# [ 0.8512, -0.5436, 0.8666],
# [-1.5343, -0.1995, 0.7313]], device='cuda:0')
Some references: https://medium.com/@yulin_li/commands-for-the-cross-validation-of-pytorch-and-cuda-installation-235c8003b446 https://medium.com/repro-repo/build-pytorch-from-source-with-cuda-12-2-1-with-ubuntu-22-04-b5b384b47ac
Everything appears to be in order since you have the correct version of Torch 2.4.1+cu121.
You can try using the full version of the model by setting the model_id parameter to unsloth/Llama-3.2-11B-Vision-Instruct
.
Alternatively, you could disable one of the GPUs(programmatically) to avoid memory distribution between two video cards (as this feature is not implemented in my script), which might be causing the issue.
I tried your suggestion to run unsloth/Llama-3.2-11B-Vision-Instruct
.
Unfortunately, this also throws an error and I see active switching between the RTX A5000 GPUs :(
Again, could you tell me what GPU and VRAM are you using to run such a model?
To create a public link, set `share=True` in `launch()`.
Traceback (most recent call last):
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/gradio/queueing.py", line 536, in process_events
response = await route_utils.call_process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/gradio/route_utils.py", line 322, in call_process_api
output = await app.get_blocks().process_api(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/gradio/blocks.py", line 1935, in process_api
result = await self.call_function(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/gradio/blocks.py", line 1520, in call_function
prediction = await anyio.to_thread.run_sync( # type: ignore
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2405, in run_sync_in_worker_thread
return await future
^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 914, in run
result = context.run(func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/gradio/utils.py", line 826, in wrapper
response = f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/clean-ui.py", line 63, in describe_image
output = model.generate(
^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/transformers/generation/utils.py", line 2048, in generate
result = self._sample(
^^^^^^^^^^^^^
File "/home/maximiliano/Documents/development/model_tools/clean-ui/venv-ui/lib/python3.11/site-packages/transformers/generation/utils.py", line 3044, in _sample
next_tokens = torch.multinomial(probs, num_samples=1).squeeze(1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: probability tensor contains either `inf`, `nan` or element < 0
I'm using a GeForce RTX 3060 12GB to run Llama-3.2-11B-Vision-bnb-4bit
and Molmo-7B-D-bnb-4bit
Thanks for the info. I suppose this rules out insufficient GPU VRAM resources on my side. Maybe I will need to try to disable one of the GPUs to avoid memory distribution between two RTX A5000s...
Thanks for sharing your scripts and gradio client app. Unfortunately, I am unable to use the molmo model via the gradio app on my server (Ubuntu 22.04 with 2x RTX A5000 48 GB VRAM) - the error trace is below. I wonder whether you have any suggestions as to what I could get it running :) I followed exactly your instructions in the README, the only point is that I have CUDA Version: 12.2 and not 12.1 or 12.4 so I used 12.1 pytorch libraries.
Observations
Thanks in advance for any tips.