Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

clallier
/
guardrails-GLiNER2-lora

PEFT
Safetensors
Transformers
GLiNER
GLiNER2
lora
prompt-safety
prompt-injection
llm-guardrails
ai-safety
Model card Files Files and versions
xet
Community

Instructions to use clallier/guardrails-GLiNER2-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • PEFT

    How to use clallier/guardrails-GLiNER2-lora with PEFT:

    from peft import PeftModel
    from transformers import AutoModelForSequenceClassification
    
    base_model = AutoModelForSequenceClassification.from_pretrained("fastino/gliguard-LLMGuardrails-300M")
    model = PeftModel.from_pretrained(base_model, "clallier/guardrails-GLiNER2-lora")
  • Transformers

    How to use clallier/guardrails-GLiNER2-lora with Transformers:

    # Load model directly
    from transformers import AutoModel
    model = AutoModel.from_pretrained("clallier/guardrails-GLiNER2-lora", dtype="auto")
  • GLiNER

    How to use clallier/guardrails-GLiNER2-lora with GLiNER:

    from gliner import GLiNER
    
    model = GLiNER.from_pretrained("clallier/guardrails-GLiNER2-lora")
  • GLiNER2

    How to use clallier/guardrails-GLiNER2-lora with GLiNER2:

    from gliner2 import GLiNER2
    
    model = GLiNER2.from_pretrained("clallier/guardrails-GLiNER2-lora")
    
    # Extract entities
    text = "Apple CEO Tim Cook announced iPhone 15 in Cupertino yesterday."
    result = extractor.extract_entities(text, ["company", "person", "product", "location"])
    
    print(result)
  • Notebooks
  • Google Colab
  • Kaggle
guardrails-GLiNER2-lora
5.34 MB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 3 commits
clallier's picture
clallier
Upload adapter_config.json with huggingface_hub
8fc2c73 verified 8 days ago
  • .gitattributes
    1.52 kB
    initial commit 8 days ago
  • README.md
    4.54 kB
    Upload folder using huggingface_hub 8 days ago
  • adapter_config.json
    1.16 kB
    Upload adapter_config.json with huggingface_hub 8 days ago
  • adapter_model.safetensors
    5.33 MB
    xet
    Upload folder using huggingface_hub 8 days ago