Downloads · 30 days
16
18% of all-time downloads
yogami9/need-ai-conversational-model
need-ai-conversational-model is a text generation model from yogami9. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Multi-task conversational AI model for the NEED service marketplace platform.
Downloads · 30 days
16
18% of all-time downloads
All-time downloads
90
Public
Repo size
1.2 GB
Likes
0
Public
Click a slice to open those files.
.bin1.2 GB · 100%
From the Hugging Face model README
Multi-task conversational AI model for the NEED service marketplace platform.
This model performs three simultaneous tasks:
pip install torch transformers huggingface_hub
import torch
from transformers import AutoTokenizer
from huggingface_hub import hf_hub_download
# Download model and custom code
model_path = hf_hub_download(repo_id="yogami9/need-ai-conversational-model", filename="pytorch_model.bin")
modeling_path = hf_hub_download(repo_id="yogami9/need-ai-conversational-model", filename="modeling_need.py")
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained("yogami9/need-ai-conversational-model")
# Import and load model
import sys
import os
sys.path.insert(0, os.path.dirname(modeling_path))
from modeling_need import NEEDConversationalModel
model = NEEDConversationalModel.from_pretrained(model_path)
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
model = model.to(device)
model.eval()
def generate_response(text: str, max_length: int = 100):
# Prepare input
input_text = f"Human: {text}"
input_ids = tokenizer.encode(input_text, return_tensors='pt').to(device)
speaker_ids = torch.zeros_like(input_ids) # Human speaker
# Generate
with torch.no_grad():
output_ids = model.generate(
input_ids=input_ids,
speaker_ids=speaker_ids,
max_length=max_length,
temperature=0.8,
top_k=50
)
# Decode
response = tokenizer.decode(output_ids[0], skip_special_tokens=True)
return response
# Test
response = generate_response("I need a house cleaner in Lagos")
print(response)
Trained on conversations from the NEED service marketplace covering:
Languages: English (Nigerian context)
Primary: Customer service automation for NEED platform
Suitable for:
Not suitable for:
@misc{need-ai-2025,
title={NEED AI Conversational Model},
author={NEED Service App Team},
year={2025},
publisher={Hugging Face},
url={https://huggingface.co/yogami9/need-ai-conversational-model}
}
Apache 2.0