-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use chat template, set attention max and properly adjust length of ma…
…x new tokens
- Loading branch information
1 parent
5070365
commit 145437a
Showing
2 changed files
with
52 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import torch | ||
import subprocess | ||
|
||
print(f"PyTorch version: {torch.__version__}") | ||
print(f"CUDA available: {torch.cuda.is_available()}") | ||
if torch.cuda.is_available(): | ||
print(f"CUDA version: {torch.version.cuda}") | ||
|
||
# Check system CUDA version | ||
try: | ||
nvcc_output = subprocess.check_output(["nvcc", "--version"]).decode("utf-8") | ||
cuda_version = nvcc_output.split("release ")[-1].split(",")[0] | ||
print(f"System CUDA version: {cuda_version}") | ||
except: | ||
print("Unable to check system CUDA version") | ||
|
||
# Print the current device | ||
print(f"Current device: {torch.cuda.get_device_name(0)}") |