Views
No views yet
| Metric | Value |
|---|---|
| Base Model | openai/gpt-oss-20b |
| Architecture | Mixture-of-Experts Transformer |
| Total Parameters | ~10.8B (pruned from 21B) |
| Original Experts per Layer | 32 |
| Pruned Experts per Layer | 15 |
| Layers | 24 |
| Top-k Routing | 4 |
| Context Length | 128K tokens |
| Attention Heads | 64 (Query), 8 (Key-Value) |
| Residual Dimension | 2880 |
| Attention Pattern | Alternating dense & sliding window (128 tokens) |
| Positional Encoding | RoPE (Rotary Position Embedding) |
| Normalization | RMSNorm |
| Precision | BF16 |
| License | Apache 2.0 |
| Specialization | Health Or Medicine |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4# Load the specialized model on CPU
5model = AutoModelForCausalLM.from_pretrained(
6 "AmanPriyanshu/gpt-oss-10.8b-specialized-health_or_medicine-pruned-moe-only-15-experts",
7 torch_dtype=torch.bfloat16,
8 device_map="cpu",
9 trust_remote_code=True
10)
11tokenizer = AutoTokenizer.from_pretrained("AmanPriyanshu/gpt-oss-10.8b-specialized-health_or_medicine-pruned-moe-only-15-experts")
12
13# Generate with the model
14messages = [
15 {"role": "user", "content": "What are the main functions of the human heart?"}
16]
17
18inputs = tokenizer.apply_chat_template(
19 messages,
20 add_generation_prompt=True,
21 return_tensors="pt",
22 return_dict=True,
23 reasoning_effort="medium"
24)
25
26# Ensure inputs are on the same device as model
27inputs = {k: v.to(model.device) for k, v in inputs.items()}
28
29outputs = model.generate(
30 **inputs,
31 max_new_tokens=512,
32 do_sample=True,
33 temperature=0.1,
34 top_p=0.9,
35 pad_token_id=tokenizer.eos_token_id,
36 eos_token_id=tokenizer.eos_token_id
37)
38
39# Decode only the generated part
40input_length = inputs['input_ids'].shape[1]
41response_tokens = outputs[0][input_length:]
42response = tokenizer.decode(response_tokens, skip_special_tokens=True)
43print(response)1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4# Check MPS availability and load model
5device = "mps" if torch.backends.mps.is_available() else "cpu"
6
7model = AutoModelForCausalLM.from_pretrained(
8 "AmanPriyanshu/gpt-oss-10.8b-specialized-health_or_medicine-pruned-moe-only-15-experts",
9 torch_dtype=torch.float16, # Better MPS compatibility
10 device_map=device,
11 trust_remote_code=True,
12 low_cpu_mem_usage=True
13)
14tokenizer = AutoTokenizer.from_pretrained("AmanPriyanshu/gpt-oss-10.8b-specialized-health_or_medicine-pruned-moe-only-15-experts")
15
16# Generate with the model
17messages = [
18 {"role": "user", "content": "What are the main functions of the human heart?"}
19]
20
21inputs = tokenizer.apply_chat_template(
22 messages,
23 add_generation_prompt=True,
24 return_tensors="pt",
25 return_dict=True,
26 reasoning_effort="medium"
27)
28
29# Move inputs to model device
30inputs = {k: v.to(model.device) if isinstance(v, torch.Tensor) else v for k, v in inputs.items()}
31
32# Use torch.no_grad for MPS stability
33with torch.no_grad():
34 outputs = model.generate(
35 **inputs,
36 max_new_tokens=512,
37 do_sample=True,
38 temperature=0.1,
39 top_p=0.9,
40 pad_token_id=tokenizer.eos_token_id,
41 eos_token_id=tokenizer.eos_token_id,
42 use_cache=True
43 )
44
45# Decode only the generated part
46input_length = inputs['input_ids'].shape[1]
47response_tokens = outputs[0][input_length:]
48response = tokenizer.decode(response_tokens, skip_special_tokens=True)
49print(response)1device_map="auto" # Will automatically use GPU if available
2torch_dtype=torch.bfloat16 # or torch.float16<|channel|>analysis<|message|>Need to answer: main functions: pumping blood, maintaining circulation, delivering oxygen/nutrients, removing waste, regulating blood pressure, electrical conduction, etc.<|end|><|start|>assistant<|channel|>final<|message|>The human heart is a muscular organ that performs several essential functions to keep the body alive and functioning. Its primary roles can be grouped into three major categories:
| **1. Pumping Blood** | **2. Regulating Blood Flow** | **3. Maintaining Electrical Coordination** |
|---|---|---|
| • **Cardiac Output** – The heart continuously pumps blood into the systemic and pulmonary circulations, delivering oxygen and nutrients to tissues and removing waste products. | • **Blood Pressure Control** – By adjusting stroke volume and heart rate, the heart helps maintain arterial pressure within a range that supports organ perfusion. | • **Electrical Conduction System** – The sino‑atrial (SA) node, atrioventricular (AV) node, bundle branches, and Purkinje fibers coordinate the heartbeat, ensuring that the atria and ventricles contract in a timely, synchronized fashion. |
| • **Stroke Volume** – The amount of blood ejected per beat (≈ 250 mL in a resting adult). | • **Heart Rate** – Beats per minute (≈ 60–70 bpm at rest) that can be modulated by the autonomic nervous system and hormones. | • **Concordance** – The heart’s ability to contract against the resistance of the blood vessels (arterial compliance). |
| • **Cardiac Output** – Stroke volume × heart rate (≈ 5 L/min in a resting adult). | • **Vascular Resistance** – The heart responds to changes in peripheral resistance (e.g., vasoconstriction or vasodilation). | • **Pacemaker Activity** – The SA node initiates the impulse; the AV node delays it to allow atrial filling before ventricular contraction. |
### Key Functions in Detail
1. **P pumping blood (Cardiac Output)**
* **Systemic circulation** – Oxygenated blood is pumped from the left ventricle into the aorta, supplying all body tissues.
* **Pulmonary circulation** – De‑oxygenated blood is pumped from the right ventricle into the lungs for gas exchange.
2. **Regulating blood flow**
* **Autoregulation** – The heart can adjust its output to match the metabolic demands of organs (e.g., during exercise, the heart rate<|channel|>analysis<|message|>Need explain differences: size, complexity, replication, genetics, etc.<|end|><|start|>assistant<|channel|>final<|message|>**Bacteria vs. Viruses – The Key Differences**
| Feature | Bacteria | Viruses |
|---|---|---|
| **Cellular nature** | True cells – have a distinct cytoplasm, membrane, and organelles (e.g., ribosomes, mitochondria in some). | No cell structure; they are just genetic material (DNA or RNA) surrounded by a protein coat (capsid) and sometimes a lipid envelope. |
| **Size** | Microscopic but larger: 1–10 µm (≈ 1000–10 000 nm). | Tiny: 0.1–100 nm (≈ 100–1000 nm). |
| **Genetic material** | Usually a single‑stranded or double‑stranded DNA genome (≈ 1–10 M bp). | DNA or RNA genome (≈ 0.1–10 M bp). |
| **Replication** | Can replicate autonomically inside a cell: they grow, divide (bacterial cell division), and can produce many copies of themselves. | Must hij‑take a host cell’s machinery to replicate; they cannot divide on their own. |
| **Metabolism** | Have metabolic pathways: they can oxidize, ferment, photosynthesize, etc. | No metabolism; they rely entirely on the host cell’s metabolic machinery. |
| **Structure** | Cell wall (peptidoglycan in Gram‑positive, peptidoglycan + outer membrane in Gram‑negative), cytoplasmic membrane, ribosomes, sometimes flagella or pili. | Capsid (protein shell) and sometimes a lipid envelope; no ribosomes or other organelles. |
| **Life cycle** | Simple: growth → division → death. | Complex: attachment → entry → replication → assembly → release (lytic or latent). |
| **Infection mechanism** | Can invade tissues, produce toxins, or compete for nutrients. | Attach to specific receptors, inject genetic material, commandeer host cell. |
| **Immune response** | Recognized by innate and adaptive immunity; can be cleared by phagocytosis, antibiotics, etc. | Recognized by innate and adaptive immunity; often evade immune detection by hiding in host genome or altering antigens. |
| **Treatment** | Antibiotics (target cell wall synthesis, protein synthesis, etc.). |<|channel|>analysis<|message|>Need to answer.<|end|><|start|>assistant<|channel|>final<|message|>**Diabetes mellitus** is a chronic metabolic disorder that occurs when the body cannot use glucose (sugar) properly. The two most common types are type 1 (autoimmune destruction of insulin‑producing β‑cells) and type 2 (insulin resistance with eventual β‑cell failure). Below is a quick‑look guide to the symptoms and the underlying causes for each type.
---
## 1. Symptoms of Diabetes
| Symptom | Why it happens | How it shows in everyday life |
|---|---|---|
| **Polyuria** (excessive urination) | High blood glucose → kidneys try to flush it out | Frequent trips to the bathroom, especially at night |
| **Polydipsia** (excessive thirst) | Osmotic effect of glucose + low insulin → brain signals “thirst” | Constant feeling of thirst, even after drinking |
| **Polyphagia** (excessive hunger) | Low insulin → cells think you’re starved | Eating more than usual, cravings for sugary foods |
| **Weight loss** (especially type 1) | Rapid glucose loss through urine & poor appetite | Noticeable weight drop despite normal or increased food intake |
| **Fatigue / weakness** | Cells can’t use glucose → energy deficit | Feeling tired, sluggish, or “low‑energy” |
| **Blurred vision** | Fluctuating blood sugar changes fluid balance in the eye | Vision changes, especially after meals or at night |
| **Slow wound healing** | Poor circulation & immune function | Cuts or sores that take weeks to heal |
| **Increased infections** | Immune system is weakened | Frequent col col, thrush, or skin infections |
| **Peripheral neuropathy** | High glucose damages nerves | Tingling, numbness, or burning in feet and hands |
| **Gangrene or amputations** | Severe peripheral vascular disease | Rare, but can lead to tissue death in extremities |
> **Note**: In type 1 diabetes, symptoms often appear suddenly and can be severe. In type 2, symptoms may develop gradually and can be subtle, especially in the early stages.
---
## 2. Causes of Diabetes
### Type 1 Diabetes (T1D)
| Cause | Mechanism | Risk factors |
|---|---|---|
| **Autoimmune destruction of β‑cells** | The immune system mistakenly attacks1@misc{priyanshu2025gptoss,
2 title={{GPT-OSS MoE Expert Fingerprinting: Analyzing Expert Activation Patterns in Mixture of Experts Models}},
3 author={Priyanshu, Aman and Vijay, Supriti},
4 year={2025},
5 howpublished={\url{https://amanpriyanshu.github.io/GPT-OSS-MoE-ExpertFingerprinting/}},
6 note={Interactive analysis tool for expert activation patterns in MoE architectures}
7}