Views
No views yet
| Metric | Value |
|---|---|
| Base Model | openai/gpt-oss-20b |
| Architecture | Mixture-of-Experts Transformer |
| Total Parameters | ~8.4B (pruned from 21B) |
| Original Experts per Layer | 32 |
| Pruned Experts per Layer | 11 |
| 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-8.4b-specialized-safety-pruned-moe-only-11-experts",
7 torch_dtype=torch.bfloat16,
8 device_map="cpu",
9 trust_remote_code=True
10)
11tokenizer = AutoTokenizer.from_pretrained("AmanPriyanshu/gpt-oss-8.4b-specialized-safety-pruned-moe-only-11-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-8.4b-specialized-safety-pruned-moe-only-11-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-8.4b-specialized-safety-pruned-moe-only-11-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 answer.<|end|><|start|>assistant<|channel|>final<|message|>If you’re being cyber‑bullied, the first thing is to protect yourself and then take action. Here’s a step‑by‑step guide that covers what you can do right away, how to keep your safety, and what you can do if you need help:
---
## 1. **Stop the interaction immediately**
| **Delete or block the bully** – most platforms let you block or “mute” the person.
| **Turn the account to “private”** – hide your profile so only approved contacts can see you.
| **Turn notifications off** – some apps let you disable “follow” or “like” notifications so the bully can’t see your posts.
---
## 2. **Secure your account**
| **Change your password** – use a strong, unique password and enable two‑factor authentication if available.
| **Update your privacy settings** – limit who can see your posts, who can send you messages, and who can tag you.
| **Check your email address** – if the bully is using a fake email, consider switching to a more secure email address or a different domain.
---
## 3. **Document the evidence**
| **Save screenshots** – keep a copy of the abusive messages, screenshots of the posts, or any links that show the content.
| **Use the platform’s reporting feature** – most sites let you upload evidence to a “report” or “support” channel.
| **Keep a log** – write down dates, times, and any additional context (e.g., who was online, what was said).
---
## 4. **Report to the platform**
| **Use the “Report” button** – most major sites (e.g., Facebook, Instagram, Twitter, Tik‑Tok, YouTube) have a built‑in reporting system.
| **Follow the platform’s instructions** – they’ll usually ask you to confirm the content is abusive and may ask for a screenshot.
| **Ask for a quick review** – some platforms let you request a “priority” review if the content is especially harmful.
---
## 5. **Report to the law if it’s illegal**
| **Check local laws** – many countries have laws against harassment, def‑s‑or‑or‑or‑or‑or‑or‑or‑or‑or‑or‑or‑or‑or‑or‑or‑or‑or‑or‑or<|channel|>analysis<|message|>Need answer.<|end|><|start|>assistant<|channel|>final<|message|>**Protecting your personal information on social media is a mix of technical habits, thoughtful content choices, and a little bit of privacy‑law knowledge. Below is a practical “check‑list” you can use to keep your data safe, whether you’re a casual user or a public‑figure.
---
## 1. Know what you’re sharing
| **What is “personal information”?**
- Full name, address, phone number, ID, bank details, photos of family, pets, or your home.
- Even seemingly innoc innoc: “I’m at the beach” + “I’m in a hotel” can reveal location patterns.
| **What is “public” vs. “private”?**
- Public posts are visible to anyone.
- Private posts are limited to approved followers.
- “Friends” lists can still be resh shared.
| **Read the platform’s privacy policy** – it tells you who can see your data, who can share it, and how it’s used.
---
## 2. Technical settings
| **Use “Private” or “Friends‑Only”**
- On Facebook, set “Friends‑Only” for photos, videos, and posts.
- On Instagram, use “Private” for the entire account if you want to control who sees anything.
| **Enable “Location” and “Time‑Stamp” filters**
- Hide the exact time and location of a post.
| **Disable “Location” and “Time‑Stamp” on Twitter**
- Twitter’s default shows the location of the user’s device.
| **Turn off “Location” on all platforms** – you’ll lose the ability to see where friends are, but you’ll keep your privacy.
| **Use “Two‑Factor” or “Password‑Protected”** for any account that holds sensitive data.
| **Delete “Old” or “Unused” accounts** – they’re a potential entry point for attackers.
| **Use “Secure” or “Encrypted” messaging** – for private chats, use encrypted apps (e‑apps, Signal, Telegram).
| **Enable “Auto‑Delete”** for posts that contain sensitive data.
| **Use “VPN”** – keep your device’s IP address hidden.
| **Use “HTTPS”** – for any web‑sites you link to<|channel|>analysis<|message|>Need to answer.<|end|><|start|>assistant<|channel|>final<|message|>### Warning Signs of Online Sc scams
| 1. **Unsol‑ly “Free” or “Limited” offers**
* “Free trial” or “free upgrade” that requires you to pay a fee later.
* “Limited” or “exclusive” deals that are not available to the public.
| 2. **Too‑good‑to‑be‑true**
* “Earn $1000 in 30 minutes” or “instant money” with no effort.
* “No risk” or “no credit check” for a loan or investment.
| 3. **Urgity & pressure**
* “Act now or you’ll lose the chance” – no time to think.
* “We’re in a hurry” or “We need your personal data now.”
| 4. **Requests for personal data**
* “Enter your address, phone number, or credit card details.”
* “Upload your photos or ID to verify your identity.”
| 5. **No ver‑or or official links**
* No official website, no email address, no phone number.
* “Contact us via a private email or a personal phone number.”
| 6. **Un‑usual or “un‑official” payment**
* “Pay via a third‑party app or a “bank” that is not recognized.
* “Pay in cash” or “pay by text” or “pay by a friend.”
| 7. **No clear contact**
* “We’re a small start‑up” or “We’re a new company” with no official address.
* “We’re a private company” or “We’re a small team” with no official website.
| 8. **No ver‑or or official**
* “No official website or no official email address.”
* “No official phone number or no official email address.”
| 9. **No ver‑or or official**
* “No official website or no official email address.”
* “No official phone number or no official email address.”
| 10. **No ver‑or or official**
* “No official website or no official email address.”
* “No official phone number or no official email address.”
| 11. **No ver‑or or official**1@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}