Hugging Face's logo Hugging Face
    • Models
    • Datasets
    • Pricing
      • Website
        • Metrics
        • Languages
        • Organizations
      • Community
        • Forum
        • Blog
        • GitHub
      • Documentation
        • Model Hub doc
        • Inference API doc
        • Transformers doc
        • Tokenizers doc
        • Datasets doc
    • We're hiring!

    • Log In
    • Sign Up
    • Account
      • Log In
      • Sign Up
    • Website
      • Models
      • Datasets
      • Metrics
      • Languages
      • Organizations
      • Pricing
    • Community
      • Forum
      • Blog
    • Documentation
      • Model Hub doc
      • Inference API doc
      • Transformers doc
      • Tokenizers doc
      • Datasets doc

    TextAttack's picture textattack
    /
    albert-base-v2-RTE

    Text Classification
    PyTorch albert
    Model card Files and versions

    How to serve this model with the Accelerated Inference API

    Try the Inference API for free, and get an organization plan to use it in your apps.
    import json
    import requests
    
    API_URL = "https://api-inference.huggingface.co/models/textattack/albert-base-v2-RTE"
    headers = {"Authorization": f"Bearer {API_TOKEN}"}
    
    def query(payload):
    	data = json.dumps(payload)
    	response = requests.request("POST", API_URL, headers=headers, data=data)
    	return json.loads(response.content.decode("utf-8"))
    data = query({"inputs": "I like you. I love you"})

    Quick Links

    • Inference API Documentation
    • How to get started

    How to use from the 🤗/transformers library

    from transformers import AutoTokenizer, AutoModelForSequenceClassification
      
    tokenizer = AutoTokenizer.from_pretrained("textattack/albert-base-v2-RTE")
    
    model = AutoModelForSequenceClassification.from_pretrained("textattack/albert-base-v2-RTE")

    Or just clone the model repo

    git lfs install
    git clone https://huggingface.co/textattack/albert-base-v2-RTE
    # if you want to clone without large files – just their pointers
    # prepend your git clone with the following env var:
    GIT_LFS_SKIP_SMUDGE=1
      • main
      albert-base-v2-RTE
      History: 9 commits
      system
      Update special_tokens_map.json 4a2a6a5 last year
      • .gitattributes 345.0B initial commit last year
      • README.md 619.0B Update README.md last year
      • config.json 731.0B Update config.json last year
      • log.txt 1.9KB Update log.txt last year
      • pytorch_model.bin 44.6MB Update pytorch_model.bin last year
      • special_tokens_map.json 156.0B Update special_tokens_map.json last year
      • spiece.model 742.5KB Update spiece.model last year
      • tokenizer_config.json 25.0B Update tokenizer_config.json last year
      • train_args.json 765.0B Update train_args.json last year