Instructions to use SummerSigh/Safety-Policy-MiniLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SummerSigh/Safety-Policy-MiniLM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="SummerSigh/Safety-Policy-MiniLM")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("SummerSigh/Safety-Policy-MiniLM") model = AutoModelForSequenceClassification.from_pretrained("SummerSigh/Safety-Policy-MiniLM", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download trainer_state.json from SummerSigh/Safety-Policy-MiniLM: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/SummerSigh/Safety-Policy-MiniLM/resolve/main/trainer_state.json
- Command line
-
hf download hf://SummerSigh/Safety-Policy-MiniLM/trainer_state.json
-
curl -L -o trainer_state.json https://huggingface.co/SummerSigh/Safety-Policy-MiniLM/resolve/main/trainer_state.json
1.01 kB
| { | |
| "best_metric": 0.09600851684808731, | |
| "best_model_checkpoint": "safety_instruct_detect/checkpoint-686", | |
| "epoch": 2.0, | |
| "global_step": 686, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 1.0, | |
| "eval_accuracy": 0.9537414965986395, | |
| "eval_loss": 0.14035563170909882, | |
| "eval_runtime": 35.4642, | |
| "eval_samples_per_second": 145.076, | |
| "eval_steps_per_second": 4.145, | |
| "step": 343 | |
| }, | |
| { | |
| "epoch": 1.46, | |
| "learning_rate": 5.451895043731778e-06, | |
| "loss": 0.2205, | |
| "step": 500 | |
| }, | |
| { | |
| "epoch": 2.0, | |
| "eval_accuracy": 0.9706511175898931, | |
| "eval_loss": 0.09600851684808731, | |
| "eval_runtime": 35.524, | |
| "eval_samples_per_second": 144.832, | |
| "eval_steps_per_second": 4.138, | |
| "step": 686 | |
| } | |
| ], | |
| "max_steps": 686, | |
| "num_train_epochs": 2, | |
| "total_flos": 1291799489699544.0, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |