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.
Model Details
Model Description
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:
Task-Oriented: Professional, direct, and helpful for mission-related queries.
Persona-Driven: Witty, empathetic, or humorous for off-topic or personal chat.
Emotion-Aware: The model's response style is influenced by a [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
[Detected Emotion: anxious]
[User Query: Are we going to make it?]
Out-of-Scope Use
This model is not intended for:
Any use without the required [Detected Emotion: ...] and [User Query: ...] tags.
Use as a base model for further fine-tuning.
Any critical decision-making without human oversight.
How to Get Started with the Model
Use the code below to get started with the model.
python
1from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
2import torch
34# Load the model from the Hub5model_id ="am-om/tars_ai"67model = AutoModelForCausalLM.from_pretrained(8 model_id,9 device_map="auto",10 torch_dtype=torch.bfloat16
11)12tokenizer = AutoTokenizer.from_pretrained(model_id)1314pipe = pipeline(15"text-generation",16 model=model,17 tokenizer=tokenizer
18)1920# --- Define your chat history ---21# The system prompt is automatically loaded from the tokenizer's chat template.22messages =[]2324# Example query25user_query ="I'm feeling a bit lonely out here."26emotion ="sad"2728# Format the input correctly!29formatted_input =f"[Detected Emotion: {emotion}]\n[User Query: {user_query}]"3031messages.append({"role":"user","content": formatted_input})3233# --- Generate the response ---34prompt = pipe.tokenizer.apply_chat_template(35 messages,36 tokenize=False,37 add_generation_prompt=True38)3940outputs = pipe(41 prompt,42 max_new_tokens=256,43 do_sample=True,44 temperature=0.7,45 top_p=0.95,46 pad_token_id=pipe.tokenizer.eos_token_id
47)4849# Extract and print just the new response50response = outputs[0]["generated_text"][len(prompt):].strip()51print(f"TARS: {response}")
Training Details
Training Data
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.
Training Procedure
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.