Deploy TinyModel1 from GitHub Actions
Browse files- README.md +38 -0
- artifact.json +15 -0
- config.json +41 -0
- model.safetensors +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +13 -0
README.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
library_name: transformers
|
| 4 |
+
datasets:
|
| 5 |
+
- ag_news
|
| 6 |
+
tags:
|
| 7 |
+
- tiny
|
| 8 |
+
- text-classification
|
| 9 |
+
- ag-news
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# TinyModel1
|
| 13 |
+
|
| 14 |
+
TinyModel1 is a lightweight news-topic classifier trained from scratch on `ag_news`.
|
| 15 |
+
|
| 16 |
+
## Task
|
| 17 |
+
|
| 18 |
+
Input: short news text
|
| 19 |
+
Output labels: World, Sports, Business, Sci/Tech
|
| 20 |
+
|
| 21 |
+
## Training setup
|
| 22 |
+
|
| 23 |
+
- Base model: tiny BERT from scratch
|
| 24 |
+
- Train samples: 3000
|
| 25 |
+
- Eval samples: 600
|
| 26 |
+
- Epochs: 2
|
| 27 |
+
- Batch size: 16
|
| 28 |
+
- Learning rate: 0.0001
|
| 29 |
+
|
| 30 |
+
## Quick metrics
|
| 31 |
+
|
| 32 |
+
- Eval accuracy: 0.5333
|
| 33 |
+
- Final train loss: 1.1577
|
| 34 |
+
|
| 35 |
+
## Intended use
|
| 36 |
+
|
| 37 |
+
- Fast baseline for category routing/classification
|
| 38 |
+
- Starter model for domain adaptation and production experiments
|
artifact.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "TinyModel1",
|
| 3 |
+
"version": "0.2.0",
|
| 4 |
+
"task": "text-classification",
|
| 5 |
+
"dataset": "ag_news",
|
| 6 |
+
"base_model": "tinymodel1-bert-scratch",
|
| 7 |
+
"labels": [
|
| 8 |
+
"World",
|
| 9 |
+
"Sports",
|
| 10 |
+
"Business",
|
| 11 |
+
"Sci/Tech"
|
| 12 |
+
],
|
| 13 |
+
"eval_accuracy": 0.5333,
|
| 14 |
+
"train_loss": 1.1577
|
| 15 |
+
}
|
config.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_cross_attention": false,
|
| 3 |
+
"architectures": [
|
| 4 |
+
"BertForSequenceClassification"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"bos_token_id": null,
|
| 8 |
+
"classifier_dropout": null,
|
| 9 |
+
"dtype": "float32",
|
| 10 |
+
"eos_token_id": null,
|
| 11 |
+
"hidden_act": "gelu",
|
| 12 |
+
"hidden_dropout_prob": 0.1,
|
| 13 |
+
"hidden_size": 128,
|
| 14 |
+
"id2label": {
|
| 15 |
+
"0": "World",
|
| 16 |
+
"1": "Sports",
|
| 17 |
+
"2": "Business",
|
| 18 |
+
"3": "Sci/Tech"
|
| 19 |
+
},
|
| 20 |
+
"initializer_range": 0.02,
|
| 21 |
+
"intermediate_size": 256,
|
| 22 |
+
"is_decoder": false,
|
| 23 |
+
"label2id": {
|
| 24 |
+
"Business": 2,
|
| 25 |
+
"Sci/Tech": 3,
|
| 26 |
+
"Sports": 1,
|
| 27 |
+
"World": 0
|
| 28 |
+
},
|
| 29 |
+
"layer_norm_eps": 1e-12,
|
| 30 |
+
"max_position_embeddings": 256,
|
| 31 |
+
"model_type": "bert",
|
| 32 |
+
"num_attention_heads": 4,
|
| 33 |
+
"num_hidden_layers": 2,
|
| 34 |
+
"pad_token_id": 0,
|
| 35 |
+
"problem_type": "single_label_classification",
|
| 36 |
+
"tie_word_embeddings": true,
|
| 37 |
+
"transformers_version": "5.5.4",
|
| 38 |
+
"type_vocab_size": 2,
|
| 39 |
+
"use_cache": true,
|
| 40 |
+
"vocab_size": 8000
|
| 41 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3ae0850b9449add792b6f2a310f04da54c51f41445970f6342fcffc4475893f4
|
| 3 |
+
size 5361600
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"cls_token": "[CLS]",
|
| 4 |
+
"do_lower_case": true,
|
| 5 |
+
"mask_token": "[MASK]",
|
| 6 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 7 |
+
"pad_token": "[PAD]",
|
| 8 |
+
"sep_token": "[SEP]",
|
| 9 |
+
"strip_accents": null,
|
| 10 |
+
"tokenize_chinese_chars": true,
|
| 11 |
+
"tokenizer_class": "BertTokenizer",
|
| 12 |
+
"unk_token": "[UNK]"
|
| 13 |
+
}
|