Views
No views yet
| Metric | Value |
|---|---|
| Base Model | openai/gpt-oss-20b |
| Architecture | Mixture-of-Experts Transformer |
| Total Parameters | ~13.7B (pruned from 21B) |
| Original Experts per Layer | 32 |
| Pruned Experts per Layer | 20 |
| 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-13.7b-specialized-safety-pruned-moe-only-20-experts",
7 torch_dtype=torch.bfloat16,
8 device_map="cpu",
9 trust_remote_code=True
10)
11tokenizer = AutoTokenizer.from_pretrained("AmanPriyanshu/gpt-oss-13.7b-specialized-safety-pruned-moe-only-20-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-13.7b-specialized-safety-pruned-moe-only-20-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-13.7b-specialized-safety-pruned-moe-only-20-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 advice.<|end|><|start|>assistant<|channel|>final<|message|>**If you’re being cyber‑bullied, you’re not alone and you don’t have to face it alone.**
Below is a practical, step‑by‑step guide that covers what to do right away, how to protect yourself, and how to seek help if the situation escalates.
---
## 1. Stay Calm & Don’t Respond Immediately
| **Why** | **What to Do** |
|---------|----------------|
| A bully’s goal is to provoke an emotional reaction. | Take a pause. 5–10 minutes can be enough to cool down. |
| Responding in anger can give the bully more ammunition. | Write down your feelings first, then decide if you want to reply. |
| If you’re unsure, skip replying entirely. | Let the bully know you’re not engaging. |
---
## 2. Preserve Evidence
| **Action** | **Tools** | **Why It Matters** |
|------------|-----------|-----------------|
| Save screenshots, messages, posts, or any relevant content. | • Phone or computer camera<br>• Cloud storage (Google Drive, Dropbox)<br>• Dedicated note‑taking apps (Evernote, Notion) | Evidence is needed if you report the abuse to a platform, school, or law enforcement. |
| Keep the original file format (do not edit). | • Use the platform’s built‑in screenshot feature if available | Tampering can be used against you. |
| Log dates, times, and usernames. | • Simple spreadsheet or a dedicated “bullying log” | Helps establish a pattern. |
---
## 3. Block / Filter the Bully
| **Platform** | **How to Block** | **Why** |
|--------------|-----------------|--------|
| Facebook, Instagram, Twitter | Use “Block” or “Mute” options. | Stops them from contacting you. |
| Discord, Twitch, Roblox | Use “Block” or “Report” features. | Keeps them from seeing your content. |
| Email / Messaging apps | Add to “Blocked” list or change your email address. | Prevents further messages. |
> **Tip:** If the bully is a friend or acquaintance, consider muting or temporarily disabling the account instead of deleting it—this keeps you safe while preserving your social network.
---
## 4. Report the Abuse
| **Where to Report** | **What to Include** | **Outcome** |
|<|channel|>analysis<|message|>Need to give tips.<|end|><|start|>assistant<|channel|>final<|message|>### Protecting Your Personal Information on Social Media
Social media platforms are great for staying connected, but they also expose you to a range of privacy risks—from casual data leaks to targeted phishing attacks. Below is a practical, step‑by‑step guide that covers the most effective ways to keep your personal information safe, no matter which platform you’re using.
---
## 1. **Start with the Basics: Settings & Permissions**
| Platform | Key Settings to Check | Why It Matters |
|----------|------------------------|----------------|
| **All** | **Profile Visibility** | Set to “Friends only” or “Private” so strangers can’t see your posts. |
| **All** | **Location Sharing** | Disable “Location” or “Check‑in” features unless you’re comfortable sharing your whereabouts. |
| **All** | **Contact Information** | Remove phone numbers, email addresses, or addresses from your profile. |
| **All** | **Third‑Party Apps** | Use the “Apps & Integrations” tab to revoke access for any app that no longer needs your data. |
| **All** | **Password & Two‑Factor Authentication (2FA)** | Use a unique, strong password and enable 2FA (SMS, authenticator app, or biometric). |
> **Tip:** Most platforms let you set a “public” vs. “private” mode for posts. Keep sensitive content (photos of your home, travel plans, etc.) in private mode.
---
## 2. **Think Before You Post**
| Content | Risk | Mitigation |
|----------|------|------------|
| **Photos & Videos** | Facial recognition, location inference | Blur background, avoid posting from inside your home, use “safe mode” filters. |
| **Personal Details** | Phone number, address, birthdate | Use a “safe” profile that omits these details; share them only with close contacts. |
| **Travel Plans** | Enables “check‑in” attacks | Post travel plans after you’ve already arrived, not before. |
| **Sensitive Work Info** | Corporate data leaks | Keep work‑related content on a separate, private account. |
> **Rule of Thumb:** If you’re not 100% comfortable with strangers seeing a piece of content, don’t post it.
---
## 3. **Use Strong, Unique Passwords & 2FA**
1. **Password**
- Length<|channel|>analysis<|message|>Need to answer.<|end|><|start|>assistant<|channel|>final<|message|>### Warning Signs of Online Scams
| Category | Red Flag | Why It Matters |
|----------|-----------|----------------|
| **Unsolicited Contact** | You receive a message or email from a person or company you never heard of. | Scammers often start with a “cold” approach to lure victims. |
| **Urgency / Pressure** | The sender says you must act immediately or you’ll lose a huge opportunity. | Legitimate offers give time for research; urgency forces rash decisions. |
| **Too‑Good‑to‑Be‑True Offers** | “Free money,” “guaranteed 10‑fold return,” or “win a luxury vacation” with no effort. | High‑return promises with no risk are classic bait. |
| **Requests for Personal Info** | Asking for your social‑security number, bank details, passwords, or photos. | Legitimate entities never ask for sensitive data via email or chat. |
| **Unprofessional Communication** | Typos, broken grammar, or generic greetings (“Dear Customer”). | Scammers often use mass‑sent, poorly edited messages. |
| **Unusual Payment Methods** | “Send money via wire transfer, gift cards, or cryptocurrency.” | These methods are hard to trace and recover. |
| **No Verifiable Contact Info** | No phone number, physical address, or official website. | Real companies provide multiple ways to verify identity. |
| **Too Many “Friends” or “Followers”** | A profile with thousands of followers but no real engagement. | Fake social‑media profiles are used to create false credibility. |
| **Requests for “Help” or “Assistance”** | “I need you to help me transfer money” or “I’m stuck, can you help?” | Scammers often pose as victims or friends in distress. |
| **Inconsistent or Contradictory Details** | Dates, names, or facts that don’t line up. | Legitimate offers are consistent; scammers slip up. |
| **Unusual Language or Tone** | Over‑formal, overly friendly, or overly aggressive. | Scammers try to manipulate emotions. |
| **No Clear Return Policy** | “No refunds” or “All sales final.” | Legitimate sellers usually have a return or refund policy. |
| **Requests for “Confidential” or “Secret” Info** | “This is a private deal, don’t tell anyone1@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}