BrtGPT-Conversation-1.5

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!

Use

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

Limits

Model is not trained on any code, math or heavy PHD level science data!

Model can generate political answers, be carefull!

Training details

Model is trained on 1x RTX 4050 Laptop GPU for few hours.

Contact

bertugscpmail@gmail.com

Downloads last month
7
Safetensors
Model size
89.7M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train Bertug1911/BrtGPT-Conversation-1.5