Downloads · 30 days
33
13% of all-time downloads
amusktweewt/tiny-model-500M-chat-v2-5-exp
tiny-model-500M-chat-v2-5-exp is a text generation model from amusktweewt. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
This model is a general-purpose transformer-based language model designed for tasks such as text generation, story writing, and conversational interactions. It leverages multiple curated datasets to enhance its storyt…
Downloads · 30 days
33
13% of all-time downloads
All-time downloads
264
Public
Parameters
503M
2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2 GB · 100%
From the Hugging Face model README
This model is a general-purpose transformer-based language model designed for tasks such as text generation, story writing, and conversational interactions. It leverages multiple curated datasets to enhance its storytelling, coding, and question-answering capabilities. This project is intended for academic research and educational purposes only. It is designed for experimentation, learning, and development of language-based AI systems.
Compared with the previous version it has gone thorough further SFT for better prompt adherence and coherence.
The model was developed with a focus on balancing performance and computational efficiency. It employs flash attention and other optimizations to improve memory efficiency and speed.
This model is intended for text generation, code completion, chat-based applications, and story writing.
The model was trained on a diverse collection of datasets, including:
The model was evaluated using subsets of the training data, focusing on language coherence, relevancy, and fluency.
The model generates coherent and most of the time contextually appropriate outputs across multiple domains.
Users should apply human review when using the model in critical or sensitive applications.
import torch
from transformers import pipeline, set_seed
model_name = "amusktweewt/tiny-model-500M-chat-v2-5-exp"
chatbot = pipeline(
"text-generation",
model=model_name,
device=0
)
set_seed(42)
print("Chatbot is ready! Type 'exit' to end the conversation.")
while True:
user_input = input("You: ").strip()
if user_input.lower() == "exit":
print("Exiting chat. Goodbye!")
break
messages = [
{"role": "user", "content": user_input},
{"role": "assistant", "content": ""}
]
prompt = chatbot.tokenizer.apply_chat_template(messages, tokenize=False)
# Generate text using the formatted prompt.
response = chatbot(
prompt,
do_sample=True,
max_new_tokens=512,
top_k=50,
temperature=0.1,
num_return_sequences=1,
repetition_penalty=1.1,
pad_token_id=chatbot.tokenizer.eos_token_id,
min_new_tokens=0
)
full_text = response[0]["generated_text"]
bot_response = full_text[len(prompt):].strip()
print(f"Bot: {bot_response}")
The model follows a Transformer-based architecture optimized for causal language modeling tasks.
amusktweewt
For questions or feedback, contact amusktweewt.