Introduction

GLIDER is a fine-tuned version of the microsoft/Phi-3.5-mini-instruct model, developed by Patronus AI for evaluating texts, conversations, and RAG setups using user-defined criteria and rubric scales. It supports a wide range of languages and covers diverse domains such as finance and medicine.

Architecture

GLIDER is based on the microsoft/Phi-3.5-mini-instruct model and is designed to handle a maximum sequence length of 8192 tokens, with testing support up to 12,000 tokens. The model is fine-tuned using synthetic and domain-adapted data from datasets like Mocha, FinQA, and Realtoxicity.

Training

The model was trained using a combination of synthetic and domain-adapted data from popular datasets, covering over 183 metrics and 685 domains. It supports multiple languages, including English, Korean, Kazakh, Hindi, and more.

Guide: Running Locally

To run GLIDER locally, you can leverage the Hugging Face Transformers library for text generation tasks:

  1. Install the necessary libraries if not already done:
    pip install transformers torch
    
  2. Use the following code to perform inference:
    from transformers import pipeline
    
    model_name = 'PatronusAI/glider'
    pipe = pipeline(
        "text-generation",
        model=model_name,
        max_new_tokens=2048,
        device="cuda",  # Use "cpu" if no GPU is available
        return_full_text=False
    )
    
    prompt = """<your prompt here>"""
    messages = [{"role": "user", "content": prompt}]
    
    result = pipe(messages)
    print(result[0]['generated_text'])
    
  3. For optimal performance, using a cloud GPU such as those from AWS, GCP, or Azure is recommended.

License

GLIDER is licensed under the Creative Commons Attribution-NonCommercial 4.0 International license (CC BY-NC 4.0). More details can be found here.

More Related APIs in Text Generation