Spaces:
Runtime error
Runtime error
stakelovelace commited on
Commit ·
227e573
1
Parent(s): 635201d
test
Browse files- app.py +1 -3
- fine_tuned_model/config.json +29 -0
app.py
CHANGED
|
@@ -85,9 +85,7 @@ def main(api_name, base_url):
|
|
| 85 |
#model = BertLMHeadModel.from_pretrained('google/codegemma-2b', is_decoder=True)
|
| 86 |
# Example assuming you have a prepared dataset for classification
|
| 87 |
#model = BertForSequenceClassification.from_pretrained('thenlper/gte-small', num_labels=2, is_decoder=True) # binary classification
|
| 88 |
-
|
| 89 |
-
model.embeddings.to('cpu')
|
| 90 |
-
|
| 91 |
model.to(device) # Move model to the appropriate device
|
| 92 |
|
| 93 |
train_model(model, tokenizer, data, device)
|
|
|
|
| 85 |
#model = BertLMHeadModel.from_pretrained('google/codegemma-2b', is_decoder=True)
|
| 86 |
# Example assuming you have a prepared dataset for classification
|
| 87 |
#model = BertForSequenceClassification.from_pretrained('thenlper/gte-small', num_labels=2, is_decoder=True) # binary classification
|
| 88 |
+
|
|
|
|
|
|
|
| 89 |
model.to(device) # Move model to the appropriate device
|
| 90 |
|
| 91 |
train_model(model, tokenizer, data, device)
|
fine_tuned_model/config.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "google/codegemma-2b",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"GemmaForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"attention_bias": false,
|
| 7 |
+
"attention_dropout": 0.0,
|
| 8 |
+
"bos_token_id": 2,
|
| 9 |
+
"eos_token_id": 1,
|
| 10 |
+
"head_dim": 256,
|
| 11 |
+
"hidden_act": "gelu",
|
| 12 |
+
"hidden_activation": null,
|
| 13 |
+
"hidden_size": 2048,
|
| 14 |
+
"initializer_range": 0.02,
|
| 15 |
+
"intermediate_size": 16384,
|
| 16 |
+
"is_decoder": true,
|
| 17 |
+
"max_position_embeddings": 8192,
|
| 18 |
+
"model_type": "gemma",
|
| 19 |
+
"num_attention_heads": 8,
|
| 20 |
+
"num_hidden_layers": 18,
|
| 21 |
+
"num_key_value_heads": 1,
|
| 22 |
+
"pad_token_id": 0,
|
| 23 |
+
"rms_norm_eps": 1e-06,
|
| 24 |
+
"rope_theta": 10000.0,
|
| 25 |
+
"torch_dtype": "float32",
|
| 26 |
+
"transformers_version": "4.40.1",
|
| 27 |
+
"use_cache": true,
|
| 28 |
+
"vocab_size": 256000
|
| 29 |
+
}
|