smirki commited on
Commit
d1164af
·
verified ·
1 Parent(s): 893f0fe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -58,7 +58,7 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStream
58
  # ----------------------------------------------------------------------
59
  # 1. Setup Model & Tokenizer (Using 8-bit Quantization from Script 2)
60
  # ----------------------------------------------------------------------
61
- model_name = 'Tesslate/UIGEN-T3-4B' # Or use Tesslate/UIGEN-T2-7B-3600 if preferred
62
  use_thread = True # For streaming UI updates
63
 
64
  # Determine optimal attention implementation
@@ -135,11 +135,11 @@ logger = logging.getLogger(__name__)
135
  # 2. Generation Parameter Setup (Values can be adjusted)
136
  # ----------------------------------------------------------------------
137
  # Using similar defaults as Script 2, but can be tuned
138
- MAX_NEW_TOKENS = 12000 # Adjusted back, but can be increased if needed
139
- TEMPERATURE = 0.7
140
- TOP_P = 0.9 # Slightly lower than Script 2 default
141
- TOP_K = 40 # Added based on Script 2 defaults
142
- REPETITION_PENALTY = 1.1 # Based on Script 2 defaults
143
 
144
  # Note: initialize_gen_kwargs function is removed as params are used directly now
145
 
 
58
  # ----------------------------------------------------------------------
59
  # 1. Setup Model & Tokenizer (Using 8-bit Quantization from Script 2)
60
  # ----------------------------------------------------------------------
61
+ model_name = 'Tesslate/UIGEN-T3-4B-Preview' # Or use Tesslate/UIGEN-T2-7B-3600 if preferred
62
  use_thread = True # For streaming UI updates
63
 
64
  # Determine optimal attention implementation
 
135
  # 2. Generation Parameter Setup (Values can be adjusted)
136
  # ----------------------------------------------------------------------
137
  # Using similar defaults as Script 2, but can be tuned
138
+ MAX_NEW_TOKENS = 20000 # Adjusted back, but can be increased if needed
139
+ TEMPERATURE = 0.6
140
+ TOP_P = 0.95 # Slightly lower than Script 2 default
141
+ TOP_K = 20 # Added based on Script 2 defaults
142
+ REPETITION_PENALTY = 1.0 # Based on Script 2 defaults
143
 
144
  # Note: initialize_gen_kwargs function is removed as params are used directly now
145