Update app.py
Browse files
app.py
CHANGED
@@ -50,6 +50,18 @@ def prompt_model(model_id, system_prompt, user_prompt, schema):
|
|
50 |
def download_model(base_model_id):
|
51 |
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
|
52 |
model = AutoModelForCausalLM.from_pretrained(base_model_id)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
model.save_pretrained(base_model_id)
|
54 |
return tokenizer
|
55 |
|
|
|
50 |
def download_model(base_model_id):
|
51 |
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
|
52 |
model = AutoModelForCausalLM.from_pretrained(base_model_id)
|
53 |
+
|
54 |
+
###
|
55 |
+
# Define the correct rope_scaling dictionary
|
56 |
+
rope_scaling = {
|
57 |
+
"type": "linear",
|
58 |
+
"factor": 8.0
|
59 |
+
}
|
60 |
+
|
61 |
+
# Update the model's config with the corrected rope_scaling
|
62 |
+
model.config.rope_scaling = rope_scaling
|
63 |
+
###
|
64 |
+
|
65 |
model.save_pretrained(base_model_id)
|
66 |
return tokenizer
|
67 |
|