Token Classification
Transformers
TensorBoard
Safetensors
distilbert
Generated from Trainer
Eval Results (legacy)
Run this model with HF Jobs
Run cwchang/ner_model on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/cwchang/ner_model. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/cwchang/ner_model on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use cwchang/ner_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cwchang/ner_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="cwchang/ner_model")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("cwchang/ner_model") model = AutoModelForTokenClassification.from_pretrained("cwchang/ner_model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
End of training
Browse filesFiles changed (14)
- README.mdAdded+50
- all_results.jsonAdded+17
- config.jsonAdded+47
- eval_results.jsonAdded+12
- model.safetensorsAdded+3
- runs/Dec04_10-18-50_1261423ab883/events.out.tfevents.1701685157.1261423ab883.2501.0Added+3
- runs/Dec04_10-18-50_1261423ab883/events.out.tfevents.1701685476.1261423ab883.2501.1Added+3
- special_tokens_map.jsonAdded+7
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+55
- train_results.jsonAdded+8
- trainer_state.jsonAdded+89
- training_args.binAdded+3
- vocab.txtAdded
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950---license: apache-2.0base_model: distilbert-base-uncasedtags:- generated_from_trainerdatasets:- conll2003model-index:- name: ner_model 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. -->
# ner_model
This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the conll2003 dataset.
## 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: 5e-05- train_batch_size: 8- eval_batch_size: 8- seed: 42- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08- lr_scheduler_type: linear- num_epochs: 3.0
### Framework versions
- Transformers 4.36.0.dev0- Pytorch 2.1.0+cu118- Datasets 2.15.0- Tokenizers 0.15.01234567891011121314151617{ "epoch": 3.0, "eval_accuracy": 0.9877146528561972, "eval_f1": 0.9397145256087323, "eval_loss": 0.055851779878139496, "eval_precision": 0.9376675603217158, "eval_recall": 0.9417704476607203, "eval_runtime": 7.0625, "eval_samples": 3250, "eval_samples_per_second": 460.177, "eval_steps_per_second": 57.628, "train_loss": 0.044327347904964204, "train_runtime": 311.2643, "train_samples": 14041, "train_samples_per_second": 135.329, "train_steps_per_second": 16.925}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647{ "_name_or_path": "distilbert-base-uncased", "activation": "gelu", "architectures": [ "DistilBertForTokenClassification" ], "attention_dropout": 0.1, "dim": 768, "dropout": 0.1, "finetuning_task": "ner", "hidden_dim": 3072, "id2label": { "0": "O", "1": "B-PER", "2": "I-PER", "3": "B-ORG", "4": "I-ORG", "5": "B-LOC", "6": "I-LOC", "7": "B-MISC", "8": "I-MISC" }, "initializer_range": 0.02, "label2id": { "B-LOC": 5, "B-MISC": 7, "B-ORG": 3, "B-PER": 1, "I-LOC": 6, "I-MISC": 8, "I-ORG": 4, "I-PER": 2, "O": 0 }, "max_position_embeddings": 512, "model_type": "distilbert", "n_heads": 12, "n_layers": 6, "pad_token_id": 0, "qa_dropout": 0.1, "seq_classif_dropout": 0.2, "sinusoidal_pos_embds": false, "tie_weights_": true, "torch_dtype": "float32", "transformers_version": "4.36.0.dev0", "vocab_size": 30522}123456789101112{ "epoch": 3.0, "eval_accuracy": 0.9877146528561972, "eval_f1": 0.9397145256087323, "eval_loss": 0.055851779878139496, "eval_precision": 0.9376675603217158, "eval_recall": 0.9417704476607203, "eval_runtime": 7.0625, "eval_samples": 3250, "eval_samples_per_second": 460.177, "eval_steps_per_second": 57.628}123version https://git-lfs.github.com/spec/v1oid sha256:73b49b372a7d4625a2ad7b5422e68f321560e0c5187572781660f59e92250f5csize 265491548123version https://git-lfs.github.com/spec/v1oid sha256:7976538e51c739926823f6bf5a334d5c4746654a2d29ae369c48de489d03c758size 6515123version https://git-lfs.github.com/spec/v1oid sha256:7c455c5f9960a9949417678d0668861d4a1057b4457a520ac3a98b211e7fa1dcsize 5601234567{ "cls_token": "[CLS]", "mask_token": "[MASK]", "pad_token": "[PAD]", "sep_token": "[SEP]", "unk_token": "[UNK]"}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455{ "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": true, "cls_token": "[CLS]", "do_lower_case": true, "mask_token": "[MASK]", "model_max_length": 512, "pad_token": "[PAD]", "sep_token": "[SEP]", "strip_accents": null, "tokenize_chinese_chars": true, "tokenizer_class": "DistilBertTokenizer", "unk_token": "[UNK]"}12345678{ "epoch": 3.0, "train_loss": 0.044327347904964204, "train_runtime": 311.2643, "train_samples": 14041, "train_samples_per_second": 135.329, "train_steps_per_second": 16.925}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889{ "best_metric": null, "best_model_checkpoint": null, "epoch": 3.0, "eval_steps": 500, "global_step": 5268, "is_hyper_param_search": false, "is_local_process_zero": true, "is_world_process_zero": true, "log_history": [ { "epoch": 0.28, "learning_rate": 4.525436598329537e-05, "loss": 0.1662, "step": 500 }, { "epoch": 0.57, "learning_rate": 4.050873196659074e-05, "loss": 0.0736, "step": 1000 }, { "epoch": 0.85, "learning_rate": 3.5763097949886106e-05, "loss": 0.0629, "step": 1500 }, { "epoch": 1.14, "learning_rate": 3.1017463933181475e-05, "loss": 0.042, "step": 2000 }, { "epoch": 1.42, "learning_rate": 2.6271829916476843e-05, "loss": 0.028, "step": 2500 }, { "epoch": 1.71, "learning_rate": 2.152619589977221e-05, "loss": 0.0283, "step": 3000 }, { "epoch": 1.99, "learning_rate": 1.678056188306758e-05, "loss": 0.0244, "step": 3500 }, { "epoch": 2.28, "learning_rate": 1.2034927866362947e-05, "loss": 0.012, "step": 4000 }, { "epoch": 2.56, "learning_rate": 7.289293849658315e-06, "loss": 0.0112, "step": 4500 }, { "epoch": 2.85, "learning_rate": 2.5436598329536827e-06, "loss": 0.0135, "step": 5000 }, { "epoch": 3.0, "step": 5268, "total_flos": 445788652997016.0, "train_loss": 0.044327347904964204, "train_runtime": 311.2643, "train_samples_per_second": 135.329, "train_steps_per_second": 16.925 } ], "logging_steps": 500, "max_steps": 5268, "num_input_tokens_seen": 0, "num_train_epochs": 3, "save_steps": 500, "total_flos": 445788652997016.0, "trial_name": null, "trial_params": null}123version https://git-lfs.github.com/spec/v1oid sha256:0a07260d95fd4eb5e3b6cd7b3391b25472cfa0b15a613ca8e828a9e11bbcd89dsize 4728README.mdAdded+50
all_results.jsonAdded+17
config.jsonAdded+47
eval_results.jsonAdded+12
model.safetensorsAdded+3
runs/Dec04_10-18-50_1261423ab883/events.out.tfevents.1701685157.1261423ab883.2501.0Added+3
runs/Dec04_10-18-50_1261423ab883/events.out.tfevents.1701685476.1261423ab883.2501.1Added+3
special_tokens_map.jsonAdded+7
tokenizer.jsonAdded
tokenizer_config.jsonAdded+55
train_results.jsonAdded+8
trainer_state.jsonAdded+89
training_args.binAdded+3
vocab.txtAdded