Views
No views yet
THIS MODEL IS FOR ENTERTAINMENT AND EDUCATIONAL PURPOSES ONLY.DO NOT use this model for actual medical advice, diagnosis, or treatment. The medical practices described by this model are from the 19th century and include bloodletting, homeopathy, unproven herbal remedies, and other practices that are dangerous, debunked, and potentially fatal by modern medical standards.If you have a medical concern, consult a licensed modern healthcare professional.
| Expert | Movement | Source Text |
|---|---|---|
| Sylvester Graham | Dietary Moralism | A Treatise on Bread, and Bread-making (1837) |
| Dr. John Harvey Kellogg | Hygienism | Ladies' Guide in Health and Disease |
| Samuel Hahnemann | Homeopathy | Organon of Medicine |
| Mary Gove Nichols | Hydropathy / Water Cure | Water Cure writings |
| Samuel Thomson | Herbalism | New Guide to Health |
| Civil War-era physicians | Conventional Medicine | Period medical advisers and surgical texts |
transformers, peft, torch, bitsandbytes1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
3from peft import PeftModel
4
5BASE_MODEL = "meta-llama/Llama-3.2-3B-Instruct"
6ADAPTER = "thisdudeabides/The-Sanitarium-Council-3B"
7
8# Load base model in 4-bit
9bnb_config = BitsAndBytesConfig(
10 load_in_4bit=True,
11 bnb_4bit_quant_type="nf4",
12 bnb_4bit_compute_dtype=torch.float16,
13)
14
15model = AutoModelForCausalLM.from_pretrained(
16 BASE_MODEL,
17 quantization_config=bnb_config,
18 device_map="auto",
19)
20
21# Load the LoRA adapter
22model = PeftModel.from_pretrained(model, ADAPTER)
23tokenizer = AutoTokenizer.from_pretrained(BASE_MODEL)
24
25# Format prompt (Alpaca style)
26alpaca_prompt = """Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.
27
28### Instruction:
29You are a 19th-century medical expert. Provide advice based on your era's medical knowledge.
30
31### Input:
32I have a headache. What should I do?
33
34### Response:
35"""
36
37inputs = tokenizer(alpaca_prompt, return_tensors="pt").to("cuda")
38
39with torch.no_grad():
40 outputs = model.generate(
41 **inputs,
42 max_new_tokens=256,
43 temperature=0.7,
44 do_sample=True,
45 pad_token_id=tokenizer.eos_token_id,
46 )
47
48response = tokenizer.decode(outputs[0], skip_special_tokens=True)
49print(response.split("### Response:")[-1].strip())| Parameter | Value |
|---|---|
| Base model | meta-llama/Llama-3.2-3B-Instruct |
| Method | LoRA (PEFT) + SFT (TRL) |
| LoRA rank | 16 |
| LoRA alpha | 16 |
| Target modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Quantization | 4-bit NF4 (bitsandbytes) |
| Training precision | FP16 |
| Batch size | 2 (with 4 gradient accumulation steps) |
| Learning rate | 2e-4 (linear decay) |
| Training steps | 120 |
| Max sequence length | 2048 |
| Final training loss | 2.54 |
| Hardware | NVIDIA GTX 1080 |
This is a joke. This is not medicine. Do not eat only bread. Do not apply leeches. See a real doctor. Preferably one from this century.