You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

Load

 vllm serve Respair/Phoneme_to_Grapheme_v2 --dtype bfloat16

Inference

from openai import OpenAI
import torch

DEVICE = "cuda:0" if torch.cuda.is_available() else "cpu"
TORCH_DTYPE = torch.float16 if "cuda" in DEVICE else torch.float32


openai_api_key = "EMPTY"
openai_api_base = "http://localhost:8000/v1"

client = OpenAI(
    api_key=openai_api_key,
    base_url=openai_api_base,
)


def graphemize(param):
    model_name="Respair/Phoneme_to_Grapheme_v2"
    chat_response = client.chat.completions.create(
        model=model_name,
        max_tokens=1024,
        # top_p=0.6,
        temperature=0.1,
        messages=[
            {"role": "user", "content": f"turn this text into normal persian: {param}"}
        ]
    )
    
    result = chat_response.choices[0].message.content
    return result.lstrip()

graphemize("be gozAreshe khabargozAriye dAnshjuyAne irAn.")
Downloads last month
-
Safetensors
Model size
4B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support