Run this model with HF Jobs
Run CambridgeMolecularEngineering/physicalsciencesbert-squad2 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/CambridgeMolecularEngineering/physicalsciencesbert-squad2. 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/CambridgeMolecularEngineering/physicalsciencesbert-squad2 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 CambridgeMolecularEngineering/physicalsciencesbert-squad2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CambridgeMolecularEngineering/physicalsciencesbert-squad2 with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "question-answering" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # pip install "transformers<5.0.0" from transformers import pipeline pipe = pipeline("question-answering", model="CambridgeMolecularEngineering/physicalsciencesbert-squad2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForQuestionAnswering tokenizer = AutoTokenizer.from_pretrained("CambridgeMolecularEngineering/physicalsciencesbert-squad2") model = AutoModelForQuestionAnswering.from_pretrained("CambridgeMolecularEngineering/physicalsciencesbert-squad2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload 15 files
Browse filesFiles changed (16)
- .gitattributes+1
- README.md+39-1
- all_results.jsonAdded+22
- config.jsonAdded+25
- eval_nbest_predictions.jsonAdded+3
- eval_null_odds.jsonAdded
- eval_predictions.jsonAdded
- eval_results.jsonAdded+17
- pytorch_model.binAdded+3
- special_tokens_map.jsonAdded+7
- tokenizer.jsonAdded
- tokenizer_config.jsonAdded+14
- train_results.jsonAdded+8
- trainer_state.jsonAdded+85
- training_args.binAdded+3
- vocab.txtAdded
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 lines3334353632 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 -texteval_nbest_predictions.json filter=lfs diff=lfs merge=lfs -text
123---license: mit---1234567891011121314151617181920212223242526272829303132333435363738394041---tags:- generated_from_trainerdatasets:- squad_v2model-index:- name: physicalsciencesbert-squad2results: []---# physicalsciencesbert-squad2This model is a fine-tuned version of [CambridgeMolecularEngineering/physicalsciencesbert](https://huggingface.co/CambridgeMolecularEngineering/physicalsciencesbert) on the squad_v2 dataset.## Training procedure### Training hyperparametersThe following hyperparameters were used during training:- learning_rate: 3e-05- train_batch_size: 12- eval_batch_size: 8- seed: 0- distributed_type: multi-GPU- num_devices: 20- total_train_batch_size: 240- total_eval_batch_size: 160- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08- lr_scheduler_type: linear- num_epochs: 10.0### Framework versions- Transformers 4.25.1- Pytorch 1.12.0a0+git664058f- Datasets 2.7.1- Tokenizers 0.12.1## AcknowledgementsThis model was trained for the paper "How beneficial is pre-training on a narrow domain-specific corpus for information extraction about photocatalytic water splitting?" by Taketomo Isazawa and Jacqueline M. Cole. J.M.C. is grateful for the BASF/Royal Academy of Engineering Research Chair in Data-Driven Molecular Engineering of Functional Materials, which includes PhD studentship support (for T.I.). This Chair is also partly supported by the Science and Technology Facilities Council. They are also indebted to the Argonne Leadership Computing Facility, which is a DOE Office of Science Facility, for use of its research resources, under contract No. DE-AC02-06CH11357.
12345678910111213141516171819202122{ "epoch": 10.0, "eval_HasAns_exact": 67.74628879892038, "eval_HasAns_f1": 75.30433877939086, "eval_HasAns_total": 5928, "eval_NoAns_exact": 71.57275021026072, "eval_NoAns_f1": 71.57275021026072, "eval_NoAns_total": 5945, "eval_best_exact": 69.67068137791628, "eval_best_exact_thresh": 0.0, "eval_best_f1": 73.44429548422731, "eval_best_f1_thresh": 0.0, "eval_exact": 69.66225890676324, "eval_f1": 73.43587301307424, "eval_samples": 11983, "eval_total": 11873, "train_loss": 0.7400637085184509, "train_runtime": 1828.1814, "train_samples": 130853, "train_samples_per_second": 715.755, "train_steps_per_second": 2.987}12345678910111213141516171819202122232425{ "_name_or_path": "/grand/projects/SolarWindowsADSP/taketomo/polaris_outputs/final_models/MLM-final-s2orc-g", "architectures": [ "BertForQuestionAnswering" ], "attention_probs_dropout_prob": 0.1, "classifier_dropout": null, "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, "position_embedding_type": "absolute", "torch_dtype": "float32", "transformers_version": "4.25.1", "type_vocab_size": 2, "use_cache": true, "vocab_size": 30522}123version https://git-lfs.github.com/spec/v1oid sha256:a5cefdd4dea612711b6a9e5e3b87911275c1db440bc2f9170609999e1f363efesize 553537961234567891011121314151617{ "epoch": 10.0, "eval_HasAns_exact": 67.74628879892038, "eval_HasAns_f1": 75.30433877939086, "eval_HasAns_total": 5928, "eval_NoAns_exact": 71.57275021026072, "eval_NoAns_f1": 71.57275021026072, "eval_NoAns_total": 5945, "eval_best_exact": 69.67068137791628, "eval_best_exact_thresh": 0.0, "eval_best_f1": 73.44429548422731, "eval_best_f1_thresh": 0.0, "eval_exact": 69.66225890676324, "eval_f1": 73.43587301307424, "eval_samples": 11983, "eval_total": 11873}123version https://git-lfs.github.com/spec/v1oid sha256:7b32990a01b934456a3549cef7b547ba021c6ffb6ee3fe74112c0b23d2972997size 4356431851234567{ "cls_token": "[CLS]", "mask_token": "[MASK]", "pad_token": "[PAD]", "sep_token": "[SEP]", "unk_token": "[UNK]"}1234567891011121314{ "cls_token": "[CLS]", "do_lower_case": true, "mask_token": "[MASK]", "model_max_length": 512, "name_or_path": "/grand/projects/SolarWindowsADSP/taketomo/polaris_outputs/final_models/MLM-final-s2orc-g", "pad_token": "[PAD]", "sep_token": "[SEP]", "special_tokens_map_file": null, "strip_accents": null, "tokenize_chinese_chars": true, "tokenizer_class": "BertTokenizer", "unk_token": "[UNK]"}12345678{ "epoch": 10.0, "train_loss": 0.7400637085184509, "train_runtime": 1828.1814, "train_samples": 130853, "train_samples_per_second": 715.755, "train_steps_per_second": 2.987}12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485{ "best_metric": null, "best_model_checkpoint": null, "epoch": 10.0, "global_step": 5460, "is_hyper_param_search": false, "is_local_process_zero": true, "is_world_process_zero": true, "log_history": [ { "epoch": 0.92, "learning_rate": 2.7252747252747255e-05, "loss": 1.7633, "step": 500 }, { "epoch": 1.83, "learning_rate": 2.4505494505494506e-05, "loss": 1.1786, "step": 1000 }, { "epoch": 2.75, "learning_rate": 2.175824175824176e-05, "loss": 0.9744, "step": 1500 }, { "epoch": 3.66, "learning_rate": 1.901098901098901e-05, "loss": 0.8272, "step": 2000 }, { "epoch": 4.58, "learning_rate": 1.6263736263736265e-05, "loss": 0.6982, "step": 2500 }, { "epoch": 5.49, "learning_rate": 1.3516483516483517e-05, "loss": 0.603, "step": 3000 }, { "epoch": 6.41, "learning_rate": 1.076923076923077e-05, "loss": 0.5212, "step": 3500 }, { "epoch": 7.33, "learning_rate": 8.021978021978022e-06, "loss": 0.451, "step": 4000 }, { "epoch": 8.24, "learning_rate": 5.274725274725275e-06, "loss": 0.4001, "step": 4500 }, { "epoch": 9.16, "learning_rate": 2.527472527472528e-06, "loss": 0.3608, "step": 5000 }, { "epoch": 10.0, "step": 5460, "total_flos": 2.2620408196051763e+17, "train_loss": 0.7400637085184509, "train_runtime": 1828.1814, "train_samples_per_second": 715.755, "train_steps_per_second": 2.987 } ], "max_steps": 5460, "num_train_epochs": 10, "total_flos": 2.2620408196051763e+17, "trial_name": null, "trial_params": null}123version https://git-lfs.github.com/spec/v1oid sha256:4b8d63209f67d79c64df7b47df9c01ed167d565feec439036fbfd0ef230fd163size 4207.gitattributes+1
README.md+39-1
all_results.jsonAdded+22
config.jsonAdded+25
eval_nbest_predictions.jsonAdded+3
eval_null_odds.jsonAdded
eval_predictions.jsonAdded
eval_results.jsonAdded+17
pytorch_model.binAdded+3
special_tokens_map.jsonAdded+7
tokenizer.jsonAdded
tokenizer_config.jsonAdded+14
train_results.jsonAdded+8
trainer_state.jsonAdded+85
training_args.binAdded+3
vocab.txtAdded