Downloads · 30 days
16
17% of all-time downloads
am-om/tars_ai
tars_ai is a text generation model from am-om. 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.
This is a fine-tuned version of google/gemma-3-1b-it trained to act as the TARS astronaut assistant from Interstellar. It is designed to be professional for tasks but witty for off-topic chat, and its responses are gu…
Downloads · 30 days
16
17% of all-time downloads
All-time downloads
96
Public
Parameters
1000M
4 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors4 GB · 99%
From the Hugging Face model README
This is a fine-tuned version of google/gemma-3-1b-it trained to act as the TARS astronaut assistant from Interstellar.
It is designed to be professional for tasks but witty for off-topic chat, and its responses are guided by a simulated user emotion tag.
This model is a QLoRA fine-tune of google/gemma-3-1b-it on a custom synthetic dataset.
The goal was to create a chatbot that embodies the TARS persona:
[Detected Emotion: ...] tag.Developed by: (huggingface.co/am-om)
Shared by: (Om Singh)
Model type: Causal Language Model
Language(s): English (en)
License: apache-2.0
Finetuned from model: google/gemma-3-1b-it
This model is intended for direct use as a chatbot, following a specific prompt format.
⚠️ Important: This model requires a specific prompt format that includes a detected emotion.
Do not send raw text as the user query.
The user turn must follow this structure:
[Detected Emotion: {emotion}]
[User Query: {your_text_here}]
Example:
[Detected Emotion: anxious]
[User Query: Are we going to make it?]
This model is not intended for:
[Detected Emotion: ...] and [User Query: ...] tags.Use the code below to get started with the model.
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
import torch
# Load the model from the Hub
model_id = "am-om/tars_ai"
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto",
torch_dtype=torch.bfloat16
)
tokenizer = AutoTokenizer.from_pretrained(model_id)
pipe = pipeline(
"text-generation",
model=model,
tokenizer=tokenizer
)
# --- Define your chat history ---
# The system prompt is automatically loaded from the tokenizer's chat template.
messages = []
# Example query
user_query = "I'm feeling a bit lonely out here."
emotion = "sad"
# Format the input correctly!
formatted_input = f"[Detected Emotion: {emotion}]\n[User Query: {user_query}]"
messages.append({"role": "user", "content": formatted_input})
# --- Generate the response ---
prompt = pipe.tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
outputs = pipe(
prompt,
max_new_tokens=256,
do_sample=True,
temperature=0.7,
top_p=0.95,
pad_token_id=pipe.tokenizer.eos_token_id
)
# Extract and print just the new response
response = outputs[0]["generated_text"][len(prompt):].strip()
print(f"TARS: {response}")
This model was fine-tuned on a custom, synthetically-generated dataset of 344 prompt/response pairs. The dataset was designed to teach the model to differentiate between task-oriented and persona-driven queries based on the emotion tag.
The model was fine-tuned using QLoRA for 3 epochs. The adapter (from checkpoint-156, the best-performing epoch) was then merged with the base model.
r: 16alpha: 32dropout: 0.05Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
This is a standard decoder-only Transformer (Gemma 3) fine-tuned with a Causal Language Modeling objective.
transformerstrlbitsandbytesacceleratepeft(Om Singh)(huggingface.co/am-om)
(huggingface.co/am-om)