Downloads · 30 days
26
30% of all-time downloads
CyberSecify/telegram-bot-phi35mini-nlu-merged
telegram-bot-phi35mini-nlu-merged is a text generation model from CyberSecify. Use it when you need the model to write or continue text. The card lists the license as mit.
Fine-tuned Phi-3.5-mini-instruct for intent classification and entity extraction in a Telegram bot.
Downloads · 30 days
26
30% of all-time downloads
All-time downloads
87
Public
Repo size
7.6 GB
Likes
0
Public
Click a slice to open those files.
.bin7.6 GB · 100%
From the Hugging Face model README
Fine-tuned Phi-3.5-mini-instruct for intent classification and entity extraction in a Telegram bot.
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model = AutoModelForCausalLM.from_pretrained(
"CyberSecify/telegram-bot-phi35mini-nlu-merged",
torch_dtype=torch.float16,
device_map="auto",
trust_remote_code=True
)
tokenizer = AutoTokenizer.from_pretrained(
"CyberSecify/telegram-bot-phi35mini-nlu-merged",
trust_remote_code=True
)
# Format prompt
system_msg = "You are an NLU assistant. Classify intents and extract entities. Return JSON."
user_msg = "what is the weather in london?"
prompt = f"<|system|>{system_msg}<|end|><|user|>{user_msg}<|end|><|assistant|>"
# Generate
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=200, temperature=0.1)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)