Run this model with HF Jobs
Run karths/binary_classification_train_code 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/karths/binary_classification_train_code. 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/karths/binary_classification_train_code 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 karths/binary_classification_train_code with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use karths/binary_classification_train_code with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="karths/binary_classification_train_code")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("karths/binary_classification_train_code") model = AutoModelForSequenceClassification.from_pretrained("karths/binary_classification_train_code", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse filesFiles changed (28)
- .gitattributes+4
- checkpoint-12885/config.jsonAdded+28
- checkpoint-12885/model.safetensorsAdded+3
- checkpoint-12885/optimizer.ptAdded+3
- checkpoint-12885/rng_state.pthAdded+3
- checkpoint-12885/scheduler.ptAdded+3
- checkpoint-12885/trainer_state.jsonAdded+169
- checkpoint-12885/training_args.binAdded+3
- classification_report.jsonAdded+1
- config.jsonAdded+28
- confusion_matrix.pngAdded
- detailed_confusion_matrix.pngAdded
- fold_results.jsonAdded+67
- metrics.jsonAdded+1
- metrics_all_fold.jsonAdded+44
- metrics_ci_bounds.jsonAdded+26
- metrics_mean.jsonAdded+8
- metrics_std.jsonAdded+8
- metrics_visualisation.pngAdded
- model.safetensorsAdded+3
- precision_recall_curve.pngAdded
- reduced_main_data.csvAdded+3
- roc_curve.pngAdded
- test_data_for_future_evaluation.csvAdded+3
- test_top_repo_data.csvAdded+3
- top_repo_data.csvAdded+3
- tracker_carbon_statistics.jsonAdded+33
- training_args.binAdded+3
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines3334353637383932 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -textreduced_main_data.csv filter=lfs diff=lfs merge=lfs -texttest_data_for_future_evaluation.csv filter=lfs diff=lfs merge=lfs -texttest_top_repo_data.csv filter=lfs diff=lfs merge=lfs -texttop_repo_data.csv filter=lfs diff=lfs merge=lfs -text
12345678910111213141516171819202122232425262728{ "_name_or_path": "distilroberta-base", "architectures": [ "RobertaForSequenceClassification" ], "attention_probs_dropout_prob": 0.1, "bos_token_id": 0, "classifier_dropout": null, "eos_token_id": 2, "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 768, "initializer_range": 0.02, "intermediate_size": 3072, "layer_norm_eps": 1e-05, "max_position_embeddings": 514, "model_type": "roberta", "num_attention_heads": 12, "num_hidden_layers": 6, "pad_token_id": 1, "position_embedding_type": "absolute", "problem_type": "single_label_classification", "torch_dtype": "float32", "transformers_version": "4.35.0", "type_vocab_size": 1, "use_cache": true, "vocab_size": 50265}123version https://git-lfs.github.com/spec/v1oid sha256:ddf8cae4165bf8c4ce39f9a029b7910466c5a2651b3a41a86f29e7176e98ca7esize 328492280123version https://git-lfs.github.com/spec/v1oid sha256:df67bf6b83ac2642dbe50cbf5fb9c059aec32985697b7ada2fde6c21337cb5edsize 657047610123version https://git-lfs.github.com/spec/v1oid sha256:7b776737e1e6d31f9e734e4f1e3f4d7f487d6e54fa570b12ee6db23810f2bfc6size 14244123version https://git-lfs.github.com/spec/v1oid sha256:20298cb29c82eeb24d41e1c40e2c637cad3f42fad4f63868541abcc66bd3c92fsize 1064123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169{ "best_metric": null, "best_model_checkpoint": null, "epoch": 4.999030067895247, "eval_steps": 500, "global_step": 12885, "is_hyper_param_search": false, "is_local_process_zero": true, "is_world_process_zero": true, "log_history": [ { "epoch": 0.19, "learning_rate": 4.99e-05, "loss": 0.0599, "step": 500 }, { "epoch": 0.39, "learning_rate": 4.97999958968678e-05, "loss": 0.0763, "step": 1000 }, { "epoch": 0.58, "learning_rate": 4.920159465099463e-05, "loss": 0.0765, "step": 1500 }, { "epoch": 0.78, "learning_rate": 4.8214408436601485e-05, "loss": 0.0868, "step": 2000 }, { "epoch": 0.97, "learning_rate": 4.685737469208415e-05, "loss": 0.0843, "step": 2500 }, { "epoch": 1.16, "learning_rate": 4.514686169369878e-05, "loss": 0.0716, "step": 3000 }, { "epoch": 1.36, "learning_rate": 4.311270072490833e-05, "loss": 0.0691, "step": 3500 }, { "epoch": 1.55, "learning_rate": 4.0787569434422325e-05, "loss": 0.0677, "step": 4000 }, { "epoch": 1.75, "learning_rate": 3.82142034348649e-05, "loss": 0.0695, "step": 4500 }, { "epoch": 1.94, "learning_rate": 3.5423642164834494e-05, "loss": 0.0666, "step": 5000 }, { "epoch": 2.13, "learning_rate": 3.24656309622951e-05, "loss": 0.0555, "step": 5500 }, { "epoch": 2.33, "learning_rate": 2.9387688608915686e-05, "loss": 0.0526, "step": 6000 }, { "epoch": 2.52, "learning_rate": 2.6245594204007562e-05, "loss": 0.0478, "step": 6500 }, { "epoch": 2.72, "learning_rate": 2.30772470772302e-05, "loss": 0.0545, "step": 7000 }, { "epoch": 2.91, "learning_rate": 1.9939787891736486e-05, "loss": 0.0511, "step": 7500 }, { "epoch": 3.1, "learning_rate": 1.6883618159833997e-05, "loss": 0.0414, "step": 8000 }, { "epoch": 3.3, "learning_rate": 1.3963523303957105e-05, "loss": 0.0355, "step": 8500 }, { "epoch": 3.49, "learning_rate": 1.1214724938519077e-05, "loss": 0.0387, "step": 9000 }, { "epoch": 3.69, "learning_rate": 8.692185278441231e-06, "loss": 0.0376, "step": 9500 }, { "epoch": 3.88, "learning_rate": 6.426330704931902e-06, "loss": 0.0387, "step": 10000 }, { "epoch": 4.07, "learning_rate": 4.458851653214341e-06, "loss": 0.0339, "step": 10500 }, { "epoch": 4.27, "learning_rate": 2.821354564608486e-06, "loss": 0.0337, "step": 11000 }, { "epoch": 4.46, "learning_rate": 1.542337081476908e-06, "loss": 0.0363, "step": 11500 }, { "epoch": 4.66, "learning_rate": 6.372264631526293e-07, "loss": 0.0355, "step": 12000 }, { "epoch": 4.85, "learning_rate": 1.2349006124565966e-07, "loss": 0.0398, "step": 12500 } ], "logging_steps": 500, "max_steps": 12885, "num_train_epochs": 5, "save_steps": 500, "total_flos": 1.0922943771416986e+17, "trial_name": null, "trial_params": null}123version https://git-lfs.github.com/spec/v1oid sha256:336b64d3e439ccf1f56b003354c997a02fc1f403faa604c0c892f3a88b71156dsize 46641{"0": {"precision": 0.9909803551190026, "recall": 0.9878548227651461, "f1-score": 0.9894151205827577, "support": 21243}, "1": {"precision": 0.9871385842472582, "recall": 0.9904466563297154, "f1-score": 0.9887898534441865, "support": 19993}, "accuracy": 0.9891114560093123, "macro avg": {"precision": 0.9890594696831304, "recall": 0.9891507395474308, "f1-score": 0.9891024870134721, "support": 41236}, "weighted avg": {"precision": 0.9891176980950724, "recall": 0.9891114560093123, "f1-score": 0.989111963974419, "support": 41236}}12345678910111213141516171819202122232425262728{ "_name_or_path": "distilroberta-base", "architectures": [ "RobertaForSequenceClassification" ], "attention_probs_dropout_prob": 0.1, "bos_token_id": 0, "classifier_dropout": null, "eos_token_id": 2, "hidden_act": "gelu", "hidden_dropout_prob": 0.1, "hidden_size": 768, "initializer_range": 0.02, "intermediate_size": 3072, "layer_norm_eps": 1e-05, "max_position_embeddings": 514, "model_type": "roberta", "num_attention_heads": 12, "num_hidden_layers": 6, "pad_token_id": 1, "position_embedding_type": "absolute", "problem_type": "single_label_classification", "torch_dtype": "float32", "transformers_version": "4.35.0", "type_vocab_size": 1, "use_cache": true, "vocab_size": 50265}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667{ "0": { "eval_loss": 0.5052816867828369, "eval_precision": 0.7948368241597662, "eval_recall": 0.8162264905962385, "eval_acc": 0.8087593365020855, "eval_mcc": 0.6176794752614307, "eval_f1": 0.8053896648734021, "eval_auc": 0.8967781438031812, "eval_runtime": 166.2932, "eval_samples_per_second": 247.972, "eval_steps_per_second": 3.879, "epoch": 5.0 }, "1": { "eval_loss": 0.3054937422275543, "eval_precision": 0.8913420127716449, "eval_recall": 0.9006602641056423, "eval_acc": 0.8986080124163353, "eval_mcc": 0.7971324306691953, "eval_f1": 0.895976911402483, "eval_auc": 0.9648091302045201, "eval_runtime": 169.3736, "eval_samples_per_second": 243.462, "eval_steps_per_second": 3.808, "epoch": 5.0 }, "2": { "eval_loss": 0.11079292744398117, "eval_precision": 0.9627800229506561, "eval_recall": 0.9652360944377751, "eval_acc": 0.9650548064797749, "eval_mcc": 0.9300532340632585, "eval_f1": 0.9640064943174721, "eval_auc": 0.9943482547415502, "eval_runtime": 173.7033, "eval_samples_per_second": 237.393, "eval_steps_per_second": 3.713, "epoch": 5.0 }, "3": { "eval_loss": 0.0527581162750721, "eval_precision": 0.9798957557706627, "eval_recall": 0.9873455709498324, "eval_acc": 0.9840430691628674, "eval_mcc": 0.9680902738066289, "eval_f1": 0.9836065573770492, "eval_auc": 0.998707724514765, "eval_runtime": 178.1729, "eval_samples_per_second": 231.438, "eval_steps_per_second": 3.62, "epoch": 5.0 }, "4": { "eval_loss": 0.04064163565635681, "eval_precision": 0.9871385842472582, "eval_recall": 0.9904466563297154, "eval_acc": 0.9891114560093123, "eval_mcc": 0.978210204972689, "eval_f1": 0.9887898534441865, "eval_auc": 0.9990561329520928, "eval_runtime": 198.2012, "eval_samples_per_second": 208.051, "eval_steps_per_second": 3.254, "epoch": 5.0 }}1{"precision": 0.9871385842472582, "recall": 0.9904466563297154, "acc": 0.9891114560093123, "mcc": 0.978210204972689, "f1": 0.9887898534441865, "auc": 0.9990561329520928}1234567891011121314151617181920212223242526272829303132333435363738394041424344{ "precision": [ 0.7948368241597662, 0.8913420127716449, 0.9627800229506561, 0.9798957557706627, 0.9871385842472582 ], "recall": [ 0.8162264905962385, 0.9006602641056423, 0.9652360944377751, 0.9873455709498324, 0.9904466563297154 ], "f1": [ 0.8053896648734021, 0.895976911402483, 0.9640064943174721, 0.9836065573770492, 0.9887898534441865 ], "auc": [ 0.8967781438031812, 0.9648091302045201, 0.9943482547415502, 0.998707724514765, 0.9990561329520928 ], "acc": [ 0.8087593365020855, 0.8986080124163353, 0.9650548064797749, 0.9840430691628674, 0.9891114560093123 ], "mcc": [ 0.6176794752614307, 0.7971324306691953, 0.9300532340632585, 0.9680902738066289, 0.978210204972689 ]}1234567891011121314151617181920212223242526{ "precision": { "ci_lower": 0.8223995992144444, "ci_upper": 1.023997680745551 }, "recall": { "ci_lower": 0.8399626753867347, "ci_upper": 1.024003355180947 }, "f1": { "ci_lower": 0.8310914252699197, "ci_upper": 1.024016367295917 }, "auc": { "ci_lower": 0.9164503354317686, "ci_upper": 1.0250294190546752 }, "acc": { "ci_lower": 0.8342996357051065, "ci_upper": 1.0239310365230436 }, "mcc": { "ci_lower": 0.668680421474075, "ci_upper": 1.0477858260352062 }}12345678{ "precision": 0.9231986399799977, "recall": 0.9319830152838409, "f1": 0.9275538962829184, "auc": 0.9707398772432219, "acc": 0.929115336114075, "mcc": 0.8582331237546406}12345678{ "precision": 0.08118060998093907, "recall": 0.07411050012743055, "f1": 0.07768806307708406, "auc": 0.04372321488743366, "acc": 0.07636180202223163, "mcc": 0.15266022253587036}123version https://git-lfs.github.com/spec/v1oid sha256:ddf8cae4165bf8c4ce39f9a029b7910466c5a2651b3a41a86f29e7176e98ca7esize 328492280123version https://git-lfs.github.com/spec/v1oid sha256:249242a2142aed25a05f8187532ab2b63c5e65e7e05846dcceddd4f4987e77bbsize 856936819123version https://git-lfs.github.com/spec/v1oid sha256:163ad0b1a9e526b779763b9777029650fb104c8660e8aee2bc2a7f1f75912c93size 155760170123version https://git-lfs.github.com/spec/v1oid sha256:049a972f9efdbea10e21ab37ab596677a68d5fc1e21e6f4a6dba47fc4ca5a87dsize 47900099123version https://git-lfs.github.com/spec/v1oid sha256:12ce5731fa5f0e41302b90457275226e68c949125df13ece28540cb9caf948a7size 19462080123456789101112131415161718192021222324252627282930313233{ "cloud_provider": "", "cloud_region": "", "codecarbon_version": "2.3.4", "country_iso_code": "NOR", "country_name": "Norway", "cpu_count": 64, "cpu_energy": 0.6414879479552255, "cpu_model": "AMD EPYC 7282 16-Core Processor", "cpu_power": 6.456417917773275, "duration": 46774.495191812515, "emissions": 0.49034117249362397, "emissions_rate": 1.0483088496900639e-05, "energy_consumed": 17.798227676719563, "gpu_count": 8, "gpu_energy": 15.934865315382055, "gpu_model": "8 x NVIDIA GeForce RTX 2080 Ti", "gpu_power": 1313.0591675764938, "latitude": 59.955, "longitude": 10.859, "on_cloud": "N", "os": "Linux-4.18.0-513.11.1.el8_9.x86_64-x86_64-with-glibc2.28", "project_name": "codecarbon", "pue": 1.0, "python_version": "3.10.8", "ram_energy": 1.221874413382281, "ram_power": 94.20606708526611, "ram_total_size": 251.21617889404297, "region": "oslo county", "run_id": "6bfbcf00-2384-4f98-a040-2eceaed1cceb", "timestamp": "2024-03-16T07:50:06", "tracking_mode": "machine"}123version https://git-lfs.github.com/spec/v1oid sha256:336b64d3e439ccf1f56b003354c997a02fc1f403faa604c0c892f3a88b71156dsize 4664.gitattributes+4
checkpoint-12885/config.jsonAdded+28
checkpoint-12885/model.safetensorsAdded+3
checkpoint-12885/optimizer.ptAdded+3
checkpoint-12885/rng_state.pthAdded+3
checkpoint-12885/scheduler.ptAdded+3
checkpoint-12885/trainer_state.jsonAdded+169
checkpoint-12885/training_args.binAdded+3
classification_report.jsonAdded+1
config.jsonAdded+28
confusion_matrix.pngAdded

detailed_confusion_matrix.pngAdded

fold_results.jsonAdded+67
metrics.jsonAdded+1
metrics_all_fold.jsonAdded+44
metrics_ci_bounds.jsonAdded+26
metrics_mean.jsonAdded+8
metrics_std.jsonAdded+8
metrics_visualisation.pngAdded

model.safetensorsAdded+3
precision_recall_curve.pngAdded

reduced_main_data.csvAdded+3
roc_curve.pngAdded

test_data_for_future_evaluation.csvAdded+3
test_top_repo_data.csvAdded+3
top_repo_data.csvAdded+3
tracker_carbon_statistics.jsonAdded+33
training_args.binAdded+3