Nonnormalizable commited on
Commit
9b38a9a
·
1 Parent(s): f718d63

Pointing at bert-mini

Browse files
Files changed (2) hide show
  1. Finetune BERT.ipynb +2 -3
  2. tasks/text.py +2 -2
Finetune BERT.ipynb CHANGED
@@ -463,9 +463,8 @@
463
  "[bert-base some hp tuning](https://huggingface.co/datasets/frugal-ai-challenge/public-leaderboard-text/blob/main/submissions/Nonnormalizable_20250120_231350.json):\\\n",
464
  "acc 0.707, energy 0.803 Wh\n",
465
  "\n",
466
- "bert-tiny, Nvidia 1xL40S:\n",
467
- "\n",
468
- "bert-tiny, "
469
  ]
470
  },
471
  {
 
463
  "[bert-base some hp tuning](https://huggingface.co/datasets/frugal-ai-challenge/public-leaderboard-text/blob/main/submissions/Nonnormalizable_20250120_231350.json):\\\n",
464
  "acc 0.707, energy 0.803 Wh\n",
465
  "\n",
466
+ "bert-tiny, Nvidia T4 small:\\\n",
467
+ "acc 0.618, energy 0.079 Wh"
 
468
  ]
469
  },
470
  {
tasks/text.py CHANGED
@@ -13,6 +13,7 @@ from .utils.emissions import tracker, clean_emissions_data, get_space_info
13
 
14
  router = APIRouter()
15
 
 
16
  DESCRIPTIONS = {
17
  "baseline": "baseline most common class",
18
  "bert-base": "bert base fine tuned on just training data, Nvidia T4 small",
@@ -21,7 +22,6 @@ DESCRIPTIONS = {
21
  "bert-mini": "bert min fine tuned on just training data, Nvidia T4 small",
22
  "bert-tiny": "bert tiny fine tuned on just training data, Nvidia T4 small",
23
  }
24
-
25
  ROUTE = "/text"
26
 
27
 
@@ -92,7 +92,7 @@ def bert_model(test_dataset: dict, model_type: str):
92
  @router.post(ROUTE, tags=["Text Task"])
93
  async def evaluate_text(
94
  request: TextEvaluationRequest,
95
- model_type: str = "bert-tiny",
96
  # This should be an API query parameter, but it looks like the submission repo
97
  # https://huggingface.co/spaces/frugal-ai-challenge/submission-portal
98
  # is built in a way to not accept any other endpoints or parameters.
 
13
 
14
  router = APIRouter()
15
 
16
+ MODEL_TYPE = "bert-mini"
17
  DESCRIPTIONS = {
18
  "baseline": "baseline most common class",
19
  "bert-base": "bert base fine tuned on just training data, Nvidia T4 small",
 
22
  "bert-mini": "bert min fine tuned on just training data, Nvidia T4 small",
23
  "bert-tiny": "bert tiny fine tuned on just training data, Nvidia T4 small",
24
  }
 
25
  ROUTE = "/text"
26
 
27
 
 
92
  @router.post(ROUTE, tags=["Text Task"])
93
  async def evaluate_text(
94
  request: TextEvaluationRequest,
95
+ model_type: str = MODEL_TYPE,
96
  # This should be an API query parameter, but it looks like the submission repo
97
  # https://huggingface.co/spaces/frugal-ai-challenge/submission-portal
98
  # is built in a way to not accept any other endpoints or parameters.