Downloads · 30 days
22
42% of all-time downloads
OmarGamal48812/P2P-DeepSeek-R1-8B-MBTI-LoRA
P2P-DeepSeek-R1-8B-MBTI-LoRA is a text generation model from OmarGamal48812. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as mit.
A QLoRA fine-tuned adapter for predicting Myers-Briggs personality types (MBTI) from social media posts, based on the P2P framework.
Downloads · 30 days
22
42% of all-time downloads
All-time downloads
53
Public
Repo size
44.5 MB
Likes
0
Public
Click a slice to open those files.
.safetensors27.3 MB · 61%
From the Hugging Face model README
A QLoRA fine-tuned adapter for predicting Myers-Briggs personality types (MBTI) from social media posts, based on the P2P framework.
Author: Omar Gamal ElKady | ITI - AI Track, Intake 46
Ma, T., Feng, K., Rong, Y., & Zhao, K. (2025). From Post To Personality: Harnessing LLMs for MBTI Prediction in Social Media. In Proceedings of CIKM '25. ACM.
| Parameter | Value |
|---|---|
| LoRA Rank | 16 |
| LoRA Alpha | 32 |
| Target Modules | q_proj, v_proj |
| Training Data | PersonalityCafe forum (8,675 users, 50 posts each) |
| Training Samples | 9,418 (after SMOTE oversampling for class balance) |
| Optimizer | AdamW (8-bit) |
| Learning Rate | 1e-4 |
| Batch Size | 8 (effective) |
| Epochs | 3 (with early stopping) |
| Hardware | NVIDIA H200 (Lightning AI) |
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
# Load base model (4-bit)
base_model = AutoModelForCausalLM.from_pretrained(
"unsloth/DeepSeek-R1-Distill-Llama-8B-unsloth-bnb-4bit",
device_map="auto",
torch_dtype="float16",
)
# Attach fine-tuned adapter
model = PeftModel.from_pretrained(base_model, "OmarGamal488/P2P-DeepSeek-R1-8B-MBTI-LoRA")
tokenizer = AutoTokenizer.from_pretrained("OmarGamal488/P2P-DeepSeek-R1-8B-MBTI-LoRA")
# Predict MBTI
prompt = """Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Predict the 4-letter Myers-Briggs personality type of the user from their social-media posts. Return only four uppercase letters.
### Input:
love debate theory logic prefer alone question everything analyze pattern fascinated philosophy
### Response:
"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=10, do_sample=False)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
# Output: INTP
This model is the local LLM component of the P2P framework:
User Posts --> [This Model] --> Personality Features + Hidden States
|
v
FAISS (k=5 RAG)
|
v
[DeepSeek-V3 API] --> 4-letter MBTI Type
The model serves two roles in the pipeline:
PersonalityCafe forum dataset from Kaggle:
| Type | Count | Type | Count |
|---|---|---|---|
| INFP | 1,832 | ISFP | 271 |
| INFJ | 1,470 | ENTJ | 231 |
| INTP | 1,304 | ISTJ | 205 |
| INTJ | 1,091 | ENFJ | 190 |
| ENTP | 685 | ISFJ | 166 |
| ENFP | 675 | ESTP | 89 |
| ISTP | 337 | ESFP | 48 |
| ESFJ | 42 | ||
| ESTJ | 39 |
@inproceedings{ma2025p2p,
title={From Post To Personality: Harnessing LLMs for MBTI Prediction in Social Media},
author={Ma, Tian and Feng, Kaiyu and Rong, Yu and Zhao, Kangfei},
booktitle={Proceedings of the 34th ACM International Conference on Information and Knowledge Management},
year={2025},
publisher={ACM}
}