Spaces:
Runtime error
Runtime error
Update use HF token to login
Browse files- spanish_medica_llm.py +4 -1
spanish_medica_llm.py
CHANGED
@@ -28,6 +28,8 @@ from peft import LoraConfig, get_peft_model, prepare_model_for_kbit_training
|
|
28 |
import wandb
|
29 |
from trl import SFTTrainer
|
30 |
|
|
|
|
|
31 |
|
32 |
CHAT_ML_TEMPLATE_Mistral_7B_Instruct = """
|
33 |
{% if messages[0]['role'] == 'system' %}
|
@@ -539,7 +541,8 @@ def configAndRunTraining(basemodel, dataset, eval_dataset, tokenizer):
|
|
539 |
|
540 |
|
541 |
def run_training_process():
|
542 |
-
|
|
|
543 |
tokenizer = loadSpanishTokenizer()
|
544 |
medicalSpanishDataset = loadSpanishDataset()
|
545 |
train_dataset, eval_dataset, test_dataset = splitDatasetInTestValid(
|
|
|
28 |
import wandb
|
29 |
from trl import SFTTrainer
|
30 |
|
31 |
+
from huggingface_hub import login
|
32 |
+
|
33 |
|
34 |
CHAT_ML_TEMPLATE_Mistral_7B_Instruct = """
|
35 |
{% if messages[0]['role'] == 'system' %}
|
|
|
541 |
|
542 |
|
543 |
def run_training_process():
|
544 |
+
#Loggin to Huggin Face
|
545 |
+
login(token = HG_FACE_TOKEN)
|
546 |
tokenizer = loadSpanishTokenizer()
|
547 |
medicalSpanishDataset = loadSpanishDataset()
|
548 |
train_dataset, eval_dataset, test_dataset = splitDatasetInTestValid(
|