Model Details
Model Description
This model is an effort for building a compliant real estate chatbot. We have utilized multiple prompting techniques to generate a diverse dataset of multi-turn instruction following interactions between a user and a real estate assistant and used the data to train this model.
- Developed by: Zillow Group
- Language(s) (NLP): en
- License: openrail
- Finetuned from model: Llama3-8b-instruct
Direct Use
Here's an example code to load and use the model in a chat setup:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "zillow/realestateLM_llama3-8b"
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16)
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = model.to(device)
model.eval()
messages = [
{'role': 'system', 'content': 'You are a helpful real estate chatbot. Your primary goal is to provide accurate, compliant, and useful information to users.'},
{'role': 'user', 'content': 'how do zoning laws impact the feasibility of integrating smart grid technology in new residential developments?'}
]
input_ids = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
input_t = torch.LongTensor([input_ids]).to(device)
output = model.generate(input_t)[:,input_t.shape[1]:]
resp = tokenizer.batch_decode(output, skip_special_tokens=True)[0]
print(resp)
Model tree for zillow/realestateLM_llama3-8b
Base model
meta-llama/Meta-Llama-3-8B-Instruct