Views
No views yet
| Metric | Value |
|---|---|
| Base Model | openai/gpt-oss-20b |
| Architecture | Mixture-of-Experts Transformer |
| Total Parameters | ~11.4B (pruned from 21B) |
| Original Experts per Layer | 32 |
| Pruned Experts per Layer | 16 |
| 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 | Safety |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4# Load the specialized model on CPU
5model = AutoModelForCausalLM.from_pretrained(
6 "AmanPriyanshu/gpt-oss-11.4b-specialized-safety-pruned-moe-only-16-experts",
7 torch_dtype=torch.bfloat16,
8 device_map="cpu",
9 trust_remote_code=True
10)
11tokenizer = AutoTokenizer.from_pretrained("AmanPriyanshu/gpt-oss-11.4b-specialized-safety-pruned-moe-only-16-experts")
12
13# Generate with the model
14messages = [
15 {"role": "user", "content": "What should someone do if they encounter cyberbullying online?"}
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-11.4b-specialized-safety-pruned-moe-only-16-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-11.4b-specialized-safety-pruned-moe-only-16-experts")
15
16# Generate with the model
17messages = [
18 {"role": "user", "content": "What should someone do if they encounter cyberbullying online?"}
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 concise advice.<|end|><|start|>assistant<|channel|>final<|message|>**If you’re being cyber‑bullied, act quickly and protect yourself.**
| Step | What to do | Why it matters |
|------|--------------|----------------|
| **1. Stop the interaction** | • Delete or block the bully’s account. <br>• Turn off notifications for that account. | Cuts the immediate source of harassment. |
| **2. Preserve evidence** | • Save screenshots, messages, posts, or any proof of the abuse. <br>• Store them in a secure folder or cloud drive. | Needed if you report the incident. |
| **3. Report the content** | • Use the platform’s “Report” or “Block” feature. <br>• If it’s a school or workplace, notify the relevant authority (teacher, HR, IT). | Platforms and institutions can remove or take action against the bully. |
| **4. Reach out for help** | • Talk to a trusted friend, family member, or counselor. <br>• If you’re a teen, consider contacting a school counselor or a local youth helline. | Emotional support and guidance. |
| **5. Protect your privacy** | • Update your privacy settings (e.g., “Friends only” for photos). <br>• Use a strong, unique password and enable two‑factor authentication. | Reduces future exposure. |
| **6. Take a break if needed** | • Log out for a few days, or switch to a different device. <br>• Engage in offline activities. | Helps you recover emotionally. |
| **7. Seek professional help if it escalates** | • If the bullying turns into threats, stalking, or you feel unsafe, contact law enforcement. <br>• Consider therapy or counseling. | Ensures your safety and mental health. |
**Quick “Do‑Not‑Do” list**
- **Don’t respond with anger or insults** – it can fuel the bully.
- **Don’t share the bully’s content with others** – it can spread the harassment.
- **Don’t ignore it** – early action often stops the cycle.
**Remember**: You’re not alone. Most platforms have tools to block and report abuse, and many schools, workplaces, and communities offer support. If you feel unsafe or overwhelmed, reach out to a trusted adult or professional right away.<|return|><|channel|>analysis<|message|>Need concise answer.<|end|><|start|>assistant<|channel|>final<|message|>**Protecting Personal Information on Social Media**
| **What to Guard** | **Why It Matters** | **Practical Steps** |
|---------------------|---------------------|---------------------|
| **Profile details** (full name, birthdate, location, phone number, email) | Can be used to create fake accounts or track you. | • Use a nickname or partial name. <br>• Hide or set “Friends” only for location, phone, email. |
| **Photos & videos** | Reveal habits, routines, or sensitive moments. | • Use “Private” or “Friends‑only” settings. <br>• Blur or crop identifying details. |
| **Posts & comments** | Public statements can be mis‑quoted or taken out of context. | • Think before posting; keep sensitive opinions private. <br>• Use “Draft” mode to review before sharing. |
| **Direct messages** | Can be intercepted or forwarded. | • Use secure messaging apps (e‑Whats, Signal) for sensitive chats. <br>• Enable “Message encryption” if available. |
| **Links & URLs** | May lead to phishing or data‑harvesting sites. | • Verify the source before clicking. <br>• Use “Safe browsing” tools. |
| **Friends list** | Untrusted contacts can access your data. | • Regularly review and remove unknown or inactive accounts. <br>• Use “Close Friends” or “Private” lists. |
| **Third‑party apps** | Some services harvest data from your profile. | • Read privacy policies. <br>• Disable unnecessary data‑sharing permissions. |
### Quick Checklist
1. **Set “Private” or “Friends‑only” on sensitive info.**
2. **Use a pseudonym or partial name.**
3. **Keep photos/videos private or blurred.**
4. **Think before posting; keep sensitive opinions off public feeds.**
5. **Verify links before clicking.**
6. **Review friends list regularly.**
7. **Limit third‑party app permissions.**
8. **Use secure messaging for private conversations.**
By applying these habits, you can keep most of your personal data out of reach while still enjoying social media.<|return|><|channel|>analysis<|message|>Need to list warning signs.<|end|><|start|>assistant<|channel|>final<|message|>### 5‑Minute Quick‑Guide: Spotting Online Scads Before You Click
| # | Warning Sign | Why It Matters | Quick Test |
|---|---|---|---|
| 1 | **Too‑too‑good‑offers** | “$1,000 free gift card” or “win a trip” with no effort. | If the reward seems larger than the effort or cost, pause. |
| 2 | **Urgity & pressure** | “Act now or you’ll lose this chance!” | Legit offers give you time to think. |
| 3 | **Unverified contact** | No real email, phone, or social‑media profile. | Google the name/URL; look for a real business page. |
| 4 | **Requests for personal data** | “Send me your SSN, bank details, or photos.” | Legit sites only ask for what’s needed (e.g., billing info). |
| 5 | **Payment before service** | “Pay $200 now, we’ll ship the product.” | Real merchants ship first, not pay first. |
| 6 | **Too many “free” offers** | “Free trial, no credit card needed.” | Free trials usually require a credit card or a sign‑up form. |
| 7 | **Unprofessional language** | Ty‑errors, broken grammar, or “Dear Sir/Mma.” | Legit sites use professional copy‑editing. |
| 8 | **No return policy** | “No refunds, no returns.” | Most reputable sellers have a return policy. |
| 9 | **Unusual payment methods** | “Pay via wire transfer, gift cards, or cryptocurrency.” | Credit cards, PayPal, or bank transfers are safer. |
| 10 | **Too many “clicks”** | “Click 3 links to claim your prize.” | Legit offers are simple, not a maze. |
---
### Quick “Red‑Flag” Checklist
1. **Does the offer sound too good to be true?**
2. **Is the sender asking for personal or financial info?**
3. **Is there a sense of urgency or a deadline?**
4. **Can you verify the sender’s identity?**
5. **What payment method is requested?**
6. **Is there a clear return or refund policy?**
---
### One‑Minute1@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}