Question Answering
PEFT
English
medical
Tonic commited on
Commit
6b5ffb9
1 Parent(s): edcfec5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +15 -2
README.md CHANGED
@@ -7,6 +7,7 @@ language:
7
  library_name: peft
8
  tags:
9
  - medical
 
10
  ---
11
 
12
  # Model Card for GaiaMiniMed
@@ -83,14 +84,26 @@ tokenizer = AutoTokenizer.from_pretrained(base_model_id, trust_remote_code=True,
83
  tokenizer.pad_token = tokenizer.eos_token
84
  tokenizer.padding_side = 'left'
85
 
 
 
 
 
 
 
 
 
 
 
 
86
 
87
 
88
  # Load the GaiaMiniMed model with the specified configuration
 
89
  # Specify the configuration class for the model
90
- model_config = AutoConfig.from_pretrained(base_model_id)
91
  # Load the PEFT model with the specified configuration
92
  peft_model = AutoModelForCausalLM.from_pretrained(base_model_id, config=model_config)
93
- peft_model = PeftModel.from_pretrained("Tonic/GaiaMiniMed")
94
  peft_model = PeftModel.from_pretrained(peft_model, "Tonic/GaiaMiniMed")
95
 
96
 
 
7
  library_name: peft
8
  tags:
9
  - medical
10
+ pipeline_tag: question-answering
11
  ---
12
 
13
  # Model Card for GaiaMiniMed
 
84
  tokenizer.pad_token = tokenizer.eos_token
85
  tokenizer.padding_side = 'left'
86
 
87
+ # Define the PeftConfig
88
+ #peft_config = PeftConfig(
89
+ # max_length=500,
90
+ # use_cache=True,
91
+ # early_stopping=False,
92
+ # bos_token_id=tokenizer.bos_token_id, # Use the tokenizer's BOS token ID
93
+ # eos_token_id=tokenizer.eos_token_id, # Use the tokenizer's EOS token ID
94
+ # pad_token_id=tokenizer.eos_token_id, # Use the tokenizer's EOS token ID
95
+ # temperature=0.4,
96
+ # do_sample=True
97
+ #)
98
 
99
 
100
  # Load the GaiaMiniMed model with the specified configuration
101
+ # Load the Peft model with a specific configuration
102
  # Specify the configuration class for the model
103
+ model_config = PeftConfig.from_pretrained(model_directory) #use base falcon config
104
  # Load the PEFT model with the specified configuration
105
  peft_model = AutoModelForCausalLM.from_pretrained(base_model_id, config=model_config)
106
+ peft_model = PeftModel.from_pretrained(model="Tonic/GaiaMiniMed")
107
  peft_model = PeftModel.from_pretrained(peft_model, "Tonic/GaiaMiniMed")
108
 
109