Text Classification
Transformers
Safetensors
English
modernbert
commitment-detection
decision-detection
experimental
vela
text-embeddings-inference
Instructions to use TwilightTechie/vela-commitment-classifier-307m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TwilightTechie/vela-commitment-classifier-307m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="TwilightTechie/vela-commitment-classifier-307m")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("TwilightTechie/vela-commitment-classifier-307m") model = AutoModelForSequenceClassification.from_pretrained("TwilightTechie/vela-commitment-classifier-307m", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download reproducibility/sequence_repair/fetch_sources.py from TwilightTechie/vela-commitment-classifier-307m: direct link, hf CLI and curl.
- Browser
- Download file 1.48 kB
-
https://huggingface.co/TwilightTechie/vela-commitment-classifier-307m/resolve/main/reproducibility/sequence_repair/fetch_sources.py
- Command line
-
hf download hf://TwilightTechie/vela-commitment-classifier-307m/reproducibility/sequence_repair/fetch_sources.py
-
curl -L -o fetch_sources.py https://huggingface.co/TwilightTechie/vela-commitment-classifier-307m/resolve/main/reproducibility/sequence_repair/fetch_sources.py
1.48 kB
| """Fetch only the pinned public dataset files used by the repair recipes.""" | |
| import argparse | |
| import hashlib | |
| import json | |
| from pathlib import Path | |
| def main(): | |
| from huggingface_hub import hf_hub_download # noqa: PLC0415 | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument( | |
| "--manifest", | |
| type=Path, | |
| default=Path(__file__).parent / "data/source-files.json", | |
| ) | |
| parser.add_argument("--output", type=Path, required=True) | |
| args = parser.parse_args() | |
| receipts = [] | |
| for item in json.loads(args.manifest.read_text()): | |
| directory = args.output / item["repo"].replace("/", "--") | |
| path = Path( | |
| hf_hub_download( | |
| repo_id=item["repo"], | |
| repo_type="dataset", | |
| filename=item["file"], | |
| revision=item["revision"], | |
| local_dir=directory, | |
| ) | |
| ) | |
| digest = hashlib.sha256(path.read_bytes()).hexdigest() | |
| if digest != item["sha256"]: | |
| raise ValueError( | |
| f"Pinned dataset file hash differs: {item['repo']}/{item['file']}" | |
| ) | |
| receipts.append({**item, "verified_sha256": digest}) | |
| print( | |
| json.dumps({"repo": item["repo"], "file": item["file"], "verified": True}), | |
| flush=True, | |
| ) | |
| (args.output / "verified-source-files.json").write_text( | |
| json.dumps(receipts, indent=2) + "\n" | |
| ) | |
| if __name__ == "__main__": | |
| main() | |