Downloads · 30 days
12
14% of all-time downloads
Bertug1911/BrtGPT-Conversation-1.5
BrtGPT-Conversation-1.5 is a text generation model from Bertug1911. Use it when you need the model to write or continue text. The card lists the license as cc.
We are introducing our new conversation model: "BrtGPT-Conversation-1.5". This model is trained on 20.000+ multi-turn, system-user-assistant conversations (Almost 3x of BrtGPT-Conversation-1.1). You can use with Syste…
Downloads · 30 days
12
14% of all-time downloads
All-time downloads
88
Public
Parameters
89.7M
359 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors359 MB · 100%
From the Hugging Face model README
We are introducing our new conversation model: "BrtGPT-Conversation-1.5". This model is trained on 20.000+ multi-turn, system-user-assistant conversations (Almost 3x of BrtGPT-Conversation-1.1). You can use with System prompt but model can generate weird answers so often!
You can use with this code (stream and dialouge):
from transformers import AutoTokenizer, AutoModelForCausalLM, TextIteratorStreamer
import torch
from threading import Thread
model_id = "Bertug1911/BrtGPT-Conversation-1.5"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_id, trust_remote_code=True)
model.eval().to("cuda" if torch.cuda.is_available() else "cpu")
def clean(text):
return text.replace(" ", "").replace("Ġ", " ").replace("Ċ", "\n")
chat_history = [
{
"role": "system",
"content": (
"You are hepfull LLM."
)
}
]
while True:
try:
question = input("\nQuestion (write "q" for exit.): ")
if question.strip().lower() in ["q", "quit", "exit"]:
print("Exiting...")
break
chat_history.append({"role": "user", "content": question})
inputs = tokenizer.apply_chat_template(
chat_history,
add_generation_prompt=True,
return_tensors="pt"
).to(model.device)
streamer = TextIteratorStreamer(
tokenizer,
skip_prompt=True,
skip_special_tokens=True
)
def generate():
model.generate(
input_ids=inputs,
streamer=streamer,
max_new_tokens=256,
do_sample=True,
top_k=10,
temperature=0.1,
)
thread = Thread(target=generate)
thread.start()
print("🤖 Answer:", end=" ", flush=True)
full_answer = ""
for token in streamer:
cleaned = clean(token)
full_answer += cleaned
print(cleaned, end="", flush=True)
chat_history.append({"role": "assistant", "content": full_answer})
except KeyboardInterrupt:
print("\nStoped.")
break
Model is not trained on any code, math or heavy PHD level science data!
Model can generate political answers, be carefull!
Model is trained on 1x RTX 4050 Laptop GPU for few hours.