Run this model with HF Jobs

Run dschulmeist/TiME-ur-xs on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/dschulmeist/TiME-ur-xs. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/dschulmeist/TiME-ur-xs on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

TiME Urdu (ur, xs)

Monolingual BERT-style encoder that outputs embeddings for Urdu. Distilled from FacebookAI/xlm-roberta-large.

Specs

  • language: Urdu (ur)
  • size: xs
  • architecture: BERT encoder
  • layers: 4
  • hidden size: 384
  • intermediate size: 1536

Usage (mean pooled embeddings)

from transformers import AutoTokenizer, AutoModel
import torch

repo = "dschulmeist/TiME-ur-xs"
tok = AutoTokenizer.from_pretrained(repo)
mdl = AutoModel.from_pretrained(repo)

def mean_pool(last_hidden_state, attention_mask):
    mask = attention_mask.unsqueeze(-1).type_as(last_hidden_state)
    return (last_hidden_state * mask).sum(1) / mask.sum(1).clamp(min=1e-9)

inputs = tok(["example sentence"], padding=True, truncation=True, return_tensors="pt")
outputs = mdl(**inputs)
emb = mean_pool(outputs.last_hidden_state, inputs['attention_mask'])
print(emb.shape)
Downloads last month
3
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train dschulmeist/TiME-ur-xs

Collection including dschulmeist/TiME-ur-xs