Soulprint Models
Collection
15 items • Updated
The Sankofa Regression Model is part of the Soulprint Archetype System, designed to measure how strongly a given text reflects the values of the Sankofa archetype.
It uses SentenceTransformer embeddings (all-mpnet-base-v2) as input features and an XGBoost regressor trained on a 1,000-row curated dataset.
The Sankofa archetype emphasizes learning from the past, honoring ancestral wisdom, and applying history to guide future actions.
Training Methodology:
all-mpnet-base-v2 from SentenceTransformers Results:
This means predictions are typically within ±0.12 of the true score, explaining 82% of dataset variance.
all-mpnet-base-v2).import joblib
from sentence_transformers import SentenceTransformer
from huggingface_hub import hf_hub_download
# -----------------------------
# 1. Download model from Hugging Face Hub
# -----------------------------
REPO_ID = "mjpsm/Sankofa-xgb-model"
FILENAME = "Sankofa_xgb_model.pkl"
model_path = hf_hub_download(repo_id=REPO_ID, filename=FILENAME)
# -----------------------------
# 2. Load model + embedder
# -----------------------------
model = joblib.load(model_path)
embedder = SentenceTransformer("all-mpnet-base-v2")
# -----------------------------
# 3. Example prediction
# -----------------------------
text = "The group studied old archives before planning, ensuring past mistakes were not repeated."
embedding = embedder.encode([text])
score = model.predict(embedding)[0]
print("Predicted Sankofa Score:", round(float(score), 3))