The model returns a
tuple
whose first element is a dictionary of logits for each CTC head. The dictionary keys correspond to the heads defined in the configuration:
['ghonna', 'hams_or_jahr', 'istitala', 'itbaq', 'phonemes', 'qalqla', 'safeer', 'shidda_or_rakhawa', 'tafashie', 'tafkheem_or_taqeeq', 'tikraar']
For example, to get phoneme logits:
output[0]['phonemes']
.
Loading the model in your code
Automatic precision selection based on GPU
import torch
from huggingface_hub import hf_hub_download
defload_optimized_model(repo_id="obadx/muaalem-v3_2-torchscript"):
if torch.cuda.is_available():
major, minor = torch.cuda.get_device_capability()
if major >= 8: # Ampere or newertry:
model_file = hf_hub_download(repo_id=repo_id, filename="model_bf16.pt")
dtype = torch.bfloat16
except:
model_file = hf_hub_download(repo_id=repo_id, filename="model_fp16.pt")
dtype = torch.float16
else:
model_file = hf_hub_download(repo_id=repo_id, filename="model_fp16.pt")
dtype = torch.float16
else:
model_file = hf_hub_download(repo_id=repo_id, filename="model_fp32.pt")
dtype = torch.float32
model = torch.jit.load(model_file)
model = model.to(dtype)
model.eval()
return model, dtype
# Load processor from the same repofrom transformers import AutoFeatureExtractor
processor = AutoFeatureExtractor.from_pretrained(repo_id, subfolder="processor")
model, dtype = load_optimized_model()
print(f"Loaded model with dtype: {dtype}")
Runs of obadx muaalem-v3_2-torchscript on huggingface.co
0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs
More Information About muaalem-v3_2-torchscript huggingface.co Model
muaalem-v3_2-torchscript huggingface.co
muaalem-v3_2-torchscript huggingface.co is an AI model on huggingface.co that provides muaalem-v3_2-torchscript's model effect (), which can be used instantly with this obadx muaalem-v3_2-torchscript model. huggingface.co supports a free trial of the muaalem-v3_2-torchscript model, and also provides paid use of the muaalem-v3_2-torchscript. Support call muaalem-v3_2-torchscript model through api, including Node.js, Python, http.
muaalem-v3_2-torchscript huggingface.co is an online trial and call api platform, which integrates muaalem-v3_2-torchscript's modeling effects, including api services, and provides a free online trial of muaalem-v3_2-torchscript, you can try muaalem-v3_2-torchscript online for free by clicking the link below.
obadx muaalem-v3_2-torchscript online free url in huggingface.co:
muaalem-v3_2-torchscript is an open source model from GitHub that offers a free installation service, and any user can find muaalem-v3_2-torchscript on GitHub to install. At the same time, huggingface.co provides the effect of muaalem-v3_2-torchscript install, users can directly use muaalem-v3_2-torchscript installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
muaalem-v3_2-torchscript install url in huggingface.co: