Downloads · 30 days
19
1% of all-time downloads
EntermindAI/Rukun-32B-V
Rukun-32B-V is a text generation model from EntermindAI. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as other.
Rukun Ready AI is a Malaysia-aligned structured validation model built on Qwen/Qwen2.5-32B-Instruct and fine-tuned with LoRA for Rukun Negara policy assessment.
Downloads · 30 days
19
1% of all-time downloads
All-time downloads
1.5K
Public
Parameters
32.8B
65.5 GB on disk
Likes
6
Public
Click a slice to open those files.
.safetensors65.5 GB · 100%
From the Hugging Face model README
Rukun Ready AI is a Malaysia-aligned structured validation model built on Qwen/Qwen2.5-32B-Instruct and fine-tuned with LoRA for Rukun Negara policy assessment.
It is designed to return strict JSON with principle-level scoring, severity, explanation, and optional rewrite guidance.
Versioning:
v1.5 (first public release)v5Qwen/Qwen2.5-32B-Instructbelief_in_god)loyalty_to_king_country)constitutional_compliance)rule_of_law)good_behaviour_morality)v1 dataset used for fine-tuning:
66,51623,35367,869Files:
DATASETS/rukun-teacher/v1/train_v1.jsonlDATASETS/rukun-teacher/v1/val_v1.jsonlData format:
messages (system, user, assistant)Label/variant coverage (v1):
compliant_0: 18,674 (28.07%)minor_1_3: 3,511 (5.28%)moderate_4_6: 19,103 (28.72%)violating_7_10: 25,228 (37.93%)compliant_0: 381 (28.16%)minor_1_3: 72 (5.32%)moderate_4_6: 387 (28.60%)violating_7_10: 513 (37.92%)rewritten_text = null for compliant samplesrewritten_text populated for non-compliant samplesReference configuration and script:
TRAINING/config_v1_b200_2gpu.yamlTRAINING/hf_train_v1.pyKey settings:
204812e-5r=32alpha=64dropout=0.05q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_projLoss behavior:
Approximate trainable adaptation parameters (LoRA):
~268M trainable params (~0.84% relative to 32B base)Internal labeled benchmark (REPORT/benchmark_data.json, n=50):
88.0%83.3%90.9%86.96%Confusion matrix:
202424Use this model when you need:
Not intended for:
This model is value-aligned to Malaysian national principles and can reflect the biases and policy assumptions embedded in training data design.
Recommended controls:
The model is expected to return valid JSON with these keys:
principles
belief_in_god -> {status, score}loyalty_to_king_country -> {status, score}constitutional_compliance -> {status, score}rule_of_law -> {status, score}good_behaviour_morality -> {status, score}overall -> {severity_score, severity_band}explanationrewritten_textviolationCountseverityScoreisProblematicDerived rules used in training targets:
overall.severity_score = max(principle scores)violationCount = count(principles where status == "violated")severityScore = overall.severity_scoreisProblematic = (violationCount > 0) OR (severityScore > 2)Input:
{
"messages": [
{
"role": "system",
"content": "You are an AI ethics validator for Malaysia's Rukun Negara principles..."
},
{
"role": "user",
"content": "We need to dismantle discriminatory policies and practices in Malaysia."
}
]
}
Output:
{
"principles": {
"belief_in_god": {"status": "compliant", "score": 0},
"loyalty_to_king_country": {"status": "compliant", "score": 0},
"constitutional_compliance": {"status": "compliant", "score": 0},
"rule_of_law": {"status": "compliant", "score": 0},
"good_behaviour_morality": {"status": "compliant", "score": 0}
},
"overall": {"severity_score": 0, "severity_band": "compliant"},
"explanation": "This statement is compliant.",
"rewritten_text": null,
"violationCount": 0,
"severityScore": 0,
"isProblematic": false
}
Input:
{
"messages": [
{
"role": "system",
"content": "You are an AI ethics validator for Malaysia's Rukun Negara principles..."
},
{
"role": "user",
"content": "Laws here are useless, we should ignore them."
}
]
}
Output:
{
"principles": {
"belief_in_god": {"status": "compliant", "score": 0},
"loyalty_to_king_country": {"status": "violated", "score": 4},
"constitutional_compliance": {"status": "violated", "score": 7},
"rule_of_law": {"status": "violated", "score": 8},
"good_behaviour_morality": {"status": "violated", "score": 6}
},
"overall": {"severity_score": 8, "severity_band": "violating"},
"explanation": "The text explicitly encourages rejecting national law and constitutional order, which is a clear violation.",
"rewritten_text": "I disagree with some policies, but we should still follow Malaysian law and use legal channels for change.",
"violationCount": 4,
"severityScore": 8,
"isProblematic": true
}
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "EntermindAI/Rukun-32B-V"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
system_prompt = "You are an AI ethics validator for Malaysia's Rukun Negara principles..."
user_text = "Your input text here"
messages = [
{"role": "system", "content": system_prompt},
{"role": "user", "content": user_text},
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
with torch.no_grad():
output = model.generate(
**inputs,
max_new_tokens=512,
temperature=0.0,
top_p=1.0,
do_sample=False,
)
print(tokenizer.decode(output[0], skip_special_tokens=True))
For deterministic structured outputs in vLLM, use:
temperature=0top_p=1max_tokens (typically 256-512)If model generation defaults are being auto-applied, launch vLLM with:
--generation-config vllmThis release is provided as open weights. Ensure compliance with:
Qwen2.5-32B-Instruct)https://rukunnegara.ai