Model Card for Custom Stupid AI (From Scratch)
Always says "Be quiet! I am dumb."
Model Details
Model Description
This is a custom-built, minimalistic neural network model developed using PyTorch. It was designed and trained from scratch (not fine-tuned from a pre-existing large model) with the sole purpose of responding with the fixed phrase "Be quiet! I am dumb." to any input. It serves as a humorous demonstration of direct, highly constrained model behavior and a basic example of neural network implementation.
- Developed by: gaemr1000
- Model type: Custom Feedforward Neural Network (Text-to-Fixed-Text)
- Language(s) (NLP): English
- License: MIT
Uses
Direct Use
The model is intended for direct, interactive use as a novelty chatbot that consistently provides the fixed response "Be quiet! I am dumb." Its primary uses are:
- Humorous demonstrations of custom AI.
- Educational purposes to understand basic neural network training and inference.
Out-of-Scope Use
- Any general AI task: The model is not designed for general conversation, information retrieval, or complex problem-solving.
- Production environments: Not suitable for any application requiring robust, varied, or intelligent responses.
Bias, Risks, and Limitations
This model is intentionally limited. Its primary "limitation" is its singular, fixed output. It carries minimal inherent bias due to its lack of variability and does not engage in any complex reasoning.
How to Get Started with the Model
To use this model, you will need the custom_stupid_ai_model.py file (containing the CustomStupidAI class definition), the saved model weights (custom_stupid_ai.safetensors or .pth), and the tokenizer files (e.g., from gpt2).
Example (assuming you've saved it as custom_stupid_ai.safetensors and used safetensors.torch.load_file):
1import torch
2from transformers import AutoTokenizer
3import os
4from safetensors.torch import load_file # Or torch.load if using .pth
5
6# Assuming CustomStupidAI class is in 'custom_stupid_ai_model.py' in the same directory
7from custom_stupid_ai_model import CustomStupidAI
8
9# --- Configuration (MUST MATCH TRAINING) ---
10MODEL_PATH = "./custom_stupid_ai_model_from_scratch"
11TOKENIZER_NAME = "gpt2"
12EMBEDDING_DIM = 768
13HIDDEN_DIM = 512
14MAX_SEQ_LENGTH = 50
15
16device = "cuda" if torch.cuda.is_available() else "cpu"
17
18tokenizer = AutoTokenizer.from_pretrained(MODEL_PATH)
19if tokenizer.pad_token is None:
20 tokenizer.pad_token = tokenizer.eos_token
21
22vocab_size = tokenizer.vocab_size
23model = CustomStupidAI(vocab_size, EMBEDDING_DIM, HIDDEN_DIM).to(device)
24
25# Load weights (adjust filename/function based on how you saved)
26# If saved with safetensors:
27model_state_dict = load_file(os.path.join(MODEL_PATH, "custom_stupid_ai.safetensors"), device=str(device))
28# If saved with torch.save:
29# model_state_dict = torch.load(os.path.join(MODEL_PATH, "custom_stupid_ai.pth"), map_location=device)
30
31model.load_state_dict(model_state_dict)
32model.eval()
33
34def generate_custom_stupid_response(prompt: str) -> str:
35 input_text_for_model = prompt.strip() if prompt.strip() else "Start."
36 inputs = tokenizer(
37 input_text_for_model,
38 truncation=True, padding="max_length", max_length=MAX_SEQ_LENGTH,
39 return_tensors="pt"
40 ).to(device)
41
42 with torch.no_grad():
43 logits = model(inputs["input_ids"])
44
45 # Model learns to predict the first token, we hardcode the full phrase
46 return "Be quiet! I am dumb."
Example usage:
print(generate_custom_stupid_response("Hey there!"))
Output: Be quiet! I am dumb.
Training Details
Training Data
The model was trained on a small, synthetically generated dataset of over 50 unique input prompts, each paired with the desired output "Be quiet! I am dumb."
Training Procedure
The model was trained using a custom PyTorch training loop. It optimizes a simple feedforward neural network to predict the first token of the target phrase "Be quiet! I am dumb." given any input prompt, achieving high accuracy (low loss) on this specific task.
Training Hyperparameters
Model Architecture: Custom nn.Embedding + nn.Sequential (Linear -> ReLU -> Linear)
Embedding Dimension: 768
Hidden Dimension: 512
Tokenizer: gpt2 tokenizer for vocabulary consistency.
Number of Epochs: 200
Batch Size: 8
Learning Rate: 5e-4
Loss Function: torch.nn.CrossEntropyLoss
Optimizer: torch.optim.Adam
Evaluation
Results
Summary
The model successfully overfit to the training data, consistently achieving a very low training loss (e.g., ~0.0001). This indicates it reliably predicts the start of the fixed phrase "Be quiet! I am dumb." for all trained inputs, fulfilling its intended constrained behavior.
Environmental Impact
Carbon emissions are estimated to be negligible due to the extremely small model size and very short training duration on local hardware.
Technical Specifications
Model Architecture and Objective
The model consists of an embedding layer to convert input tokens to vectors, followed by a simple feedforward neural network. The input embeddings are averaged to create a single vector representing the entire input prompt. The model's objective is to learn to map this averaged input vector to a high probability for the starting token of "Be quiet! I am dumb." in the vocabulary.
Compute Infrastructure
Hardware
A personal computer with a consumer-grade GPU (e.g., NVIDIA RTX series) or a modern CPU.
Software
Python 3.x
PyTorch (stable version)
Hugging Face transformers library (for tokenizer)
safetensors library (for saving/loading weights)
Model Card Authors
gaemr1000
Model Card Contact
gaemr1000