Views
No views yet
| Metric | Value |
|---|---|
| Base Model | openai/gpt-oss-20b |
| Architecture | Mixture-of-Experts Transformer |
| Total Parameters | ~10.2B (pruned from 21B) |
| Original Experts per Layer | 32 |
| Pruned Experts per Layer | 14 |
| 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.2b-specialized-health_or_medicine-pruned-moe-only-14-experts",
7 torch_dtype=torch.bfloat16,
8 device_map="cpu",
9 trust_remote_code=True
10)
11tokenizer = AutoTokenizer.from_pretrained("AmanPriyanshu/gpt-oss-10.2b-specialized-health_or_medicine-pruned-moe-only-14-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.2b-specialized-health_or_medicine-pruned-moe-only-14-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.2b-specialized-health_or_medicine-pruned-moe-only-14-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: pumping blood, regulating blood pressure, endocrine functions (atrial natriuretic peptide, renin), conduction system, valves, etc.<|end|><|start|>assistant<|channel|>final<|message|>**The human heart is a multi‑organ organ that performs several essential functions, all of which are tightly linked to the circulatory system. Below are the main roles of the heart, grouped into the most common categories:**
| **Primary Function** | **What it does** | **Key anatomical/physological features** |
|---|---|---|
| **P pumping blood** | Moves oxygen‑rich blood from the left side of the body (lungs, upper extremities) to the right side (heart, lower extremities) and then back to the lungs. | • 4 chambers (right atrium, left atrium, right ventricle, left ventricle) | • 3 valves (tricuspid, mitral, aortic) | • 3 valves (tricuspid, mitral, pulmonary) |
| **Regulating blood pressure** | Maintains a constant blood pressure by adjusting the force of contraction (stroke volume) and the resistance of the systemic circulation. | • Autonomic nervous system (sym‑/parasym) | • Hormonal systems (renin‑angiotensin, atrial natriuretic peptide) |
| **Endocrine (h endocrine) functions** | Releases hormones that influence fluid balance, blood volume, and vascular tone. | • Atrial natriuretic peptide (ANP) – vasodilator, natriuretic | • Renin – stimulates angiotensin‑II production |
| **Electrical conduction** | Generates the heartbeat and coordinates the contraction of the heart muscle. | • Sino‑atrial (SA) node – “pacemaker” | • Atrioventricular (AV) node – delays impulse to ventricles | • Bundle of His, Purkinje fibers – rapid conduction |
| **Mechanical support** | Provides a structural scaffold for the circulatory system, protecting blood vessels and organs. | • Coronary arteries – supply the heart itself | • Cardiac valves – prevent back‑flow |
| **Metabolic support** | Supplies the heart’s own energy needs and recycles metabolic waste. | • Coronary circulation – oxygen, nutrients | • Myocardial glycogen stores – energy reserve |
---
### 1. **P Pumping Blood**
- **Stroke Volume**: The amount of blood<|channel|>analysis<|message|>Need explain differences: size, structure, replication, genetics, etc.<|end|><|start|>assistant<|channel|>final<|message|>**Bacteria vs. Viruses – The Key Differences**
| Feature | Bacteria | Viruses |
|---|---|---|
| **Definition** | Single‑cell, living organisms that can grow and divide | Non‑living particles that need a host cell to replicate |
| **Size** | 1–10 µm (micrometers) – visible under a light microscope | 0.1–100 nm (nanometers) – invisible to the naked eye |
| **Structure** | Complex cell with a cell wall, membrane, cytoplasm, ribosomes, DNA, and often organelles | Very simple: a protein shell (capsid) that enclues genetic material (DNA or RNA); no cytoplasmic machinery |
| **Genetic Material** | Usually a double‑stranded DNA genome (some bacteria have plasmids) | Can be DNA or RNA; may be single‑ or double‑stranded |
| **Replication** | Grow by cell division (mitosis‑like process) – can multiply rapidly (hours) | Must hij‑take a host cell’s machinery; replication can be very fast (minutes) but depends on host |
| **Energy Source** | Metabolic pathways (oxidation, photosynthesis, etc.) | None – relies on host cell’s energy |
| **Infection Mechanism** | Can colonize surfaces, invade tissues, or remain in the gut; may cause disease by toxins, enzymes, or immune response | Attach to a cell, enter it, release genome, replicate, and exit (lyse or exocytosis) |
| **Immune Response** | Recognized by pattern‑recognation receptors (PRRs) and adaptive immunity; can be cleared by antibiotics | Recognized by PRRs and adaptive immunity; cleared by antiviral drugs or immune‑mediated killing |
| **Treatment** | Antibiotics (target cell wall, protein synthesis, etc.) | Antivirals (target viral enzymes, replication steps) or vaccines |
| **Examples** | *Staphylococcus aureus*, *E. coli*, *Mycobacterium tuberculosis* | Influenza A, HIV, SARS‑CoV‑2, HPV |
**Key Take‑aways**
1. **Living vs. Non‑living** – Bacteria are living cells that can grow on their own; viruses are inert particles that need a host cell to replicate.
2<|channel|>analysis<|message|>Need to explain symptoms and causes.<|end|><|start|>assistant<|channel|>final<|message|>**Diabetes mellitus** is a chronic metabolic disorder in which the body cannot produce or use insulin effectively, leading to high blood glucose levels. The two main types—Type 1 and Type 2—have overlapping symptoms but different underlying causes. Below is a concise overview of the symptoms and the causes for each type, plus a brief look at other forms of diabetes.
---
## 1. Symptoms of Diabetes
| Symptom | Why it happens | How it shows on the day |
|---|---|---|
| **Freckle‑like, sticky skin** | High glucose damages skin cells | Skin looks shiny, dry, or “sticky” |
| **Frequent thirst** | Kidneys try to excrete glucose | “I’m always thirsty” |
| **Frequent urination** | Kidneys excrete excess glucose | “I’m peeing a lot” |
| **Weight loss** (Type 1) | Body burns more glucose | Losing weight even without dieting |
| **Weight gain** (Type 2) | Insulin resistance → more fat stored | Gaining weight despite normal diet |
| **Fatigue / low energy** | Cells can’t use glucose efficiently | Feeling tired, sluggish |
| **Poor wound healing** | High glucose impairs immune & collagen | Cuts or sores take longer to close |
| **Vision changes** | High glucose damages retina | Blurred vision, floaters |
| **Increased infections** | Immune system weakened | Frequent colwors, thrush |
| **Night‑time hypoglycemia** (Type 1) | Insulin spikes too high | “I’m suddenly low‑glucose at night” |
| **Hyperglycemic episodes** (Type 2) | Blood glucose spikes | “I’m suddenly high‑glucose” |
> **Note** – Many people have no obvious symptoms early on, especially Type 2. That’s why routine screening is key.
---
## 2. Causes of Diabetes
### 2‑1. Type 1 Diabetes (T1D)
| Cause | Mechanism | Risk factors |
|---|---|---|
| **Auto‑immune destruction of β‑cells** | Immune system attacks insulin‑producing cells in the pancreas | Genetics, viral infections (e.g., enterovirus), early childhood, certain ethnic groups |
| **Genetic predisposition** | Certain HLA genes increase1@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}