Text Classification
GLiNER2
Safetensors
GLiNER
English
security
pentest
vulnerability-detection
decision-model
praetor
Instructions to use TyrusRC/haruspex-adapters with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- GLiNER2
How to use TyrusRC/haruspex-adapters with GLiNER2:
from gliner2 import AutoExtractor extractor = AutoExtractor.from_pretrained("TyrusRC/haruspex-adapters") # Extract entities text = "Apple CEO Tim Cook announced iPhone 15 in Cupertino yesterday." result = extractor.extract_entities(text, ["company", "person", "product", "location"]) print(result) - GLiNER
How to use TyrusRC/haruspex-adapters with GLiNER:
from gliner import GLiNER model = GLiNER.from_pretrained("TyrusRC/haruspex-adapters") text = "Cristiano Ronaldo dos Santos Aveiro was born on 5 February 1985 in Funchal, Madeira, Portugal." labels = ["person", "date", "location"] entities = model.predict_entities(text, labels) for entity in entities: print(entity["text"], "=>", entity["label"]) - Notebooks
- Google Colab
- Kaggle
Download cloud/training_config.json from TyrusRC/haruspex-adapters: direct link, hf CLI and curl.
- Browser
- Download file 2.26 kB
-
https://huggingface.co/TyrusRC/haruspex-adapters/resolve/main/cloud/training_config.json
- Command line
-
hf download hf://TyrusRC/haruspex-adapters/cloud/training_config.json
-
curl -L -o training_config.json https://huggingface.co/TyrusRC/haruspex-adapters/resolve/main/cloud/training_config.json
2.26 kB
| { | |
| "output_dir": "/home/kali/project/trc/haruspex/runs/cloud", | |
| "experiment_name": "gliner2", | |
| "num_epochs": 5, | |
| "max_steps": -1, | |
| "batch_size": 4, | |
| "eval_batch_size": 8, | |
| "gradient_accumulation_steps": 1, | |
| "encoder_lr": 1e-05, | |
| "task_lr": 0.0005, | |
| "weight_decay": 0.01, | |
| "adam_beta1": 0.9, | |
| "adam_beta2": 0.999, | |
| "adam_epsilon": 1e-08, | |
| "max_grad_norm": 1.0, | |
| "scheduler_type": "linear", | |
| "warmup_ratio": 0.1, | |
| "warmup_steps": 0, | |
| "num_cycles": 0.5, | |
| "fp16": false, | |
| "bf16": true, | |
| "eval_strategy": "no", | |
| "eval_steps": 500, | |
| "save_total_limit": 1, | |
| "save_best": false, | |
| "metric_for_best": "eval_loss", | |
| "greater_is_better": false, | |
| "logging_steps": 5, | |
| "logging_first_step": true, | |
| "report_to_wandb": false, | |
| "wandb_project": null, | |
| "wandb_entity": null, | |
| "wandb_run_name": null, | |
| "wandb_tags": [], | |
| "wandb_notes": null, | |
| "early_stopping": false, | |
| "early_stopping_patience": 3, | |
| "early_stopping_threshold": 0.0, | |
| "num_workers": 0, | |
| "pin_memory": false, | |
| "prefetch_factor": 2, | |
| "seed": 42, | |
| "deterministic": false, | |
| "local_rank": -1, | |
| "debug": false, | |
| "max_train_samples": -1, | |
| "max_eval_samples": -1, | |
| "validate_data": false, | |
| "max_len": null, | |
| "strict_training": true, | |
| "ignore_nonfinite_losses": false, | |
| "skip_step_errors": false, | |
| "allow_invalid_samples": false, | |
| "log_proposal_metrics": true, | |
| "gold_injection_start": 1.0, | |
| "gold_injection_end": 0.25, | |
| "gold_injection_hold_frac": 0.15, | |
| "diagnostics_every_n_steps": 0, | |
| "profile_first_n_steps": 0, | |
| "debug_global_steps": [], | |
| "ddp_consensus_check": true, | |
| "ddp_find_unused_parameters": false, | |
| "ddp_static_graph": true, | |
| "dry_run_recall_steps": 0, | |
| "gate_recall": 0.97, | |
| "gate_long_recall": 0.93, | |
| "on_capacity_exceeded": "raise", | |
| "dedupe_contained_entity_spans": true, | |
| "group_by_length": true, | |
| "length_group_window_batches": 50, | |
| "compile_model": false, | |
| "gradient_checkpointing": false, | |
| "fused_optimizer": true, | |
| "allow_tf32": true, | |
| "float32_matmul_precision": "high", | |
| "use_lora": true, | |
| "lora_r": 16, | |
| "lora_alpha": 32, | |
| "lora_dropout": 0.0, | |
| "lora_use_dora": false, | |
| "lora_target_modules": [ | |
| "encoder", | |
| "span_rep", | |
| "classifier", | |
| "count_embed", | |
| "count_pred" | |
| ], | |
| "save_adapter_only": true | |
| } |