Text Classification
Transformers
Safetensors
Chinese
bert
Generated from Trainer
text-embeddings-inference
Instructions to use roberthsu2003/for_classification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use roberthsu2003/for_classification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="roberthsu2003/for_classification")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("roberthsu2003/for_classification") model = AutoModelForSequenceClassification.from_pretrained("roberthsu2003/for_classification", device_map="auto") - Notebooks
- Google Colab
- Kaggle
roberthsu2003
Browse filesFiles changed (8)
- README.mdAdded+64
- config.jsonAdded+31
- model.safetensorsAdded+3
- special_tokens_map.jsonAdded+7
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+56
- training_args.binAdded+3
- vocab.txtAdded
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364---library_name: transformersbase_model: google-bert/bert-base-chinesetags:- generated_from_trainermetrics:- accuracy- f1model-index:- name: for_classification results: []---
<!-- This model card has been generated automatically according to the information the Trainer had access to. Youshould probably proofread and complete it, then remove this comment. -->
# for_classification
This model is a fine-tuned version of [google-bert/bert-base-chinese](https://huggingface.co/google-bert/bert-base-chinese) on an unknown dataset.It achieves the following results on the evaluation set:- Loss: 0.2366- Accuracy: 0.9189- F1: 0.9415
## Model description
More information needed
## Intended uses & limitations
More information needed
## Training and evaluation data
More information needed
## Training procedure
### Training hyperparameters
The following hyperparameters were used during training:- learning_rate: 2e-05- train_batch_size: 64- eval_batch_size: 128- seed: 42- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments- lr_scheduler_type: linear- num_epochs: 3
### Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 ||:-------------:|:-----:|:----:|:---------------:|:--------:|:------:|| 0.2886 | 1.0 | 110 | 0.2269 | 0.9009 | 0.9272 || 0.1799 | 2.0 | 220 | 0.2218 | 0.9112 | 0.9356 || 0.1395 | 3.0 | 330 | 0.2366 | 0.9189 | 0.9415 |
### Framework versions
- Transformers 4.50.0- Pytorch 2.6.0+cu124- Datasets 3.5.0- Tokenizers 0.21.112345678910111213141516171819202122232425262728293031{ "architectures": [ "BertForSequenceClassification" ], "attention_probs_dropout_prob": 0.1, "classifier_dropout": null, "directionality": "bidi", "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 768, "initializer_range": 0.02, "intermediate_size": 3072, "layer_norm_eps": 1e-12, "max_position_embeddings": 512, "model_type": "bert", "num_attention_heads": 12, "num_hidden_layers": 12, "pad_token_id": 0, "pooler_fc_size": 768, "pooler_num_attention_heads": 12, "pooler_num_fc_layers": 3, "pooler_size_per_head": 128, "pooler_type": "first_token_transform", "position_embedding_type": "absolute", "problem_type": "single_label_classification", "torch_dtype": "float32", "transformers_version": "4.50.0", "type_vocab_size": 2, "use_cache": true, "vocab_size": 21128}123version https://git-lfs.github.com/spec/v1oid sha256:a2e1e06683404756da7ec450f1e013a7cdc858c08c4e74e0c60665d3a61706b2size 4091002401234567{ "cls_token": "[CLS]", "mask_token": "[MASK]", "pad_token": "[PAD]", "sep_token": "[SEP]", "unk_token": "[UNK]"}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556{ "added_tokens_decoder": { "0": { "content": "[PAD]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "100": { "content": "[UNK]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "101": { "content": "[CLS]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "102": { "content": "[SEP]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "103": { "content": "[MASK]", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true } }, "clean_up_tokenization_spaces": false, "cls_token": "[CLS]", "do_lower_case": false, "extra_special_tokens": {}, "mask_token": "[MASK]", "model_max_length": 512, "pad_token": "[PAD]", "sep_token": "[SEP]", "strip_accents": null, "tokenize_chinese_chars": true, "tokenizer_class": "BertTokenizer", "unk_token": "[UNK]"}123version https://git-lfs.github.com/spec/v1oid sha256:d91d332ebafef6c1351c17c417055175fdc35cc379d6356cc83077ec8559a7a1size 5304README.mdAdded+64
config.jsonAdded+31
model.safetensorsAdded+3
special_tokens_map.jsonAdded+7
tokenizer.jsonAdded
tokenizer_config.jsonAdded+56
training_args.binAdded+3
vocab.txtAdded