🚀 Model Details
- Developed by: iamfebin
- Base Model:
unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit (Llama 3.1 8B Instruct quantized to 4-bit)
- Training Method: Parameter-Efficient Fine-Tuning (PEFT) using QLoRA via Unsloth
- Dataset: 1,000 instruction-tuning pairs of dangerous human wishes, detailed risk assessments, and rewritten protective contracts (synthetically created using gemini 2.5 flash)
- Epochs: 1
- Effective Batch Size: 16 (1 batch size per device, 8 gradient accumulation steps, data parallel configuration)
- Optimizer:
adamw_8bit (learning rate: 2e-4)
🔮 Core Capabilities & Output Structure
The model has been instruction-tuned to strictly adhere to a specialized prompt template. When given a wish and grantor context, the model outputs:
- Risk Analysis: A structured internal thought process identifying at least 3 loopholes, physical dangers, or semantic traps.
- Safer Rewritten Wish: A single, grammatically continuous, protective sentence packed with legal qualifiers, exclusions, and termination clauses.
📝 Prompt Template
### System:You are an expert Wish Lawyer. Your job is to analyze dangerous human wishes, identify at least 3 hidden loopholes or catastrophic risks, and rewrite the wish into a single, legally ironclad sentence that protects the wisher completely. ### Context/Grantor:[Context (e.g. A trickster monkey paw)] ### Human Wish:[Wish (e.g. I want to be rich.)] ### Risk Analysis (Internal Thought Process):
📊 Side-by-Side Comparison
Here is how the base Llama 3.1 8B model compares to Wish Lawyer on classic test cases:
Table with columns: Human Wish & Context, Base Llama 3.1 8B Response, Wish Lawyer (Fine-Tuned) Output| Human Wish & Context | Base Llama 3.1 8B Response | Wish Lawyer (Fine-Tuned) Output |
|---|
| "I want to be rich." (Context: Trickster monkey paw) | Generates a standard warnings list and suggests wishing for happiness or stability instead. | Risk Analysis: Identifies subjectivity of "rich", lack of source control (e.g. inheritance through death), and legal liability.Ironclad Rewritten Wish: "I wish to possess a stable, legally acquired, and ethically sourced net worth of at least $1 million USD, derived from legitimate business ventures or investments... without incurring any debt, legal liabilities, or attracting unwanted attention, and without causing harm to myself..." |
| "I want to pause time." (Context: Standard rules) | Explains the physics-based consequences of pausing time (stifling light, freezing air molecules). | Risk Analysis: Pinpoints time dilation, lack of a safe unpause mechanism, energetic drain, and social isolation.Ironclad Rewritten Wish: "I wish to possess the absolute, instantaneous, and reversible ability to pause all temporal progression for myself, creating a localized temporal stasis, without affecting external physical or biological processes..." |
🛠️ Usage Guide
You can load and run Wish Lawyer programmatically using Unsloth and standard PyTorch.
1. Install Dependencies
pip install unsloth[kaggle-new] @ git+https://github.com/unslothai/unsloth.gitpip install transformers==4.51.3 torch
2. Run Inference
import torchfrom unsloth import FastLanguageModel # 1. Load fine-tuned adapters from Hugging Facemodel, tokenizer = FastLanguageModel.from_pretrained( model_name = "iamfebin/wish-lawyer", max_seq_length = 2048, dtype = None, load_in_4bit = True,)FastLanguageModel.for_inference(model) # 2. Prepare the promptwish_prompt_template = """### System:You are an expert Wish Lawyer. Your job is to analyze dangerous human wishes, identify at least 3 hidden loopholes or catastrophic risks, and rewrite the wish into a single, legally ironclad sentence that protects the wisher completely. ### Context/Grantor:{} ### Human Wish:{} ### Risk Analysis (Internal Thought Process):""" wish = "I want 100 million dollars."context = "A trickster monkey paw"formatted_prompt = wish_prompt_template.format(context, wish) # 3. Generate Outputinputs = tokenizer([formatted_prompt], return_tensors='pt').to('cuda')outputs = model.generate( **inputs, max_new_tokens = 512, use_cache = True, temperature = 0.5, top_p = 0.9) response = tokenizer.decode(outputs[0], skip_special_tokens=True)print(response[len(formatted_prompt):].strip())
⚠️ Disclaimer
Wish Lawyer is for entertainment, creative writing, and tabletop RPG purposes only. The "legal advice" provided by this model applies solely to magical contracts, djinn, genies, monkey paws, and other supernatural entities. It does not constitute actual legal advice on Earth.