Create config.py
Browse files
config.py
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# config.py
|
2 |
+
|
3 |
+
import torch
|
4 |
+
|
5 |
+
# Device configuration
|
6 |
+
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
7 |
+
|
8 |
+
# Path to the Yi-Coder model
|
9 |
+
MODEL_PATH = "path_to_yi_coder_model" # Replace with your actual model path
|
10 |
+
|
11 |
+
# Maximum length for generated text
|
12 |
+
MAX_LENGTH = 1024
|
13 |
+
|
14 |
+
# Temperature for text generation
|
15 |
+
TEMPERATURE = 0.7
|