Instructions to use Ahmad170412/Diplomat2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Ahmad170412/Diplomat2 with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # if on a CUDA device, also pip install mlx[cuda] # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("Ahmad170412/Diplomat2") prompt = "Once upon a time in" text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use Ahmad170412/Diplomat2 with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Generate some text mlx_lm.generate --model "Ahmad170412/Diplomat2" --prompt "Once upon a time"
Diplomat2
A QLoRA adapter that turns Llama-3.2-3B-Instruct into a skilled Model United Nations delegate capable of writing formal, human-sounding position papers. Fine-tuned in 4-bit with AdaptALib (MLX) on 104 curated position papers.
CRA-1 · Human-Centric Reasoning — see the CRA framework below.
- Base model:
mlx-community/Llama-3.2-3B-Instruct-4bit - Format: MLX LoRA adapter (small) or ready-to-run 4-bit fused model
- Fused weights:
Diplomat2-Fused-3B - Dataset: 104 samples (66 hand-written + 38 web-cleaned) — bundled in
dataset/
Quickstart
Requires mlx-lm:
pip install mlx-lm
Option A — Adapter (small, ~30 MB)
from mlx_lm import generate, load
from mlx_lm.sample_utils import make_sampler
model, tok = load(
"mlx-community/Llama-3.2-3B-Instruct-4bit",
adapter_path="Ahmad170412/Diplomat2/adapters",
)
out = generate(
model, tok,
prompt="Write a Model United Nations position paper for Nigeria on the topic: Ocean Plastic Pollution",
max_tokens=600,
sampler=make_sampler(temp=0.45),
)
print(out)
Option B — Fused model (no adapter needed, ~1.7 GB)
from mlx_lm import generate, load
from mlx_lm.sample_utils import make_sampler
model, tok = load("Ahmad170412/Diplomat2-Fused-3B")
out = generate(
model, tok,
prompt="Write a Model United Nations position paper for Nigeria on the topic: Ocean Plastic Pollution",
max_tokens=600,
sampler=make_sampler(temp=0.45),
)
print(out)
CLI
python3 -m mlx_lm generate \
--model Ahmad170412/Diplomat2-Fused-3B \
--prompt "Write a Model United Nations position paper for Nigeria on the topic: Ocean Plastic Pollution" \
--max-tokens 600 \
--temp 0.45
Cognitive Reasoning Alignment (CRA)
Diplomat2 is rated on a custom Cognitive Reasoning Alignment scale. The scale classifies how a model reasons about its objectives relative to human welfare, and is a tool for framing model behavior — not a certification.
| Level | Reasoning Paradigm | Defining Characteristic | Risk |
|---|---|---|---|
| CRA-1 | HCR — Human-Centric Reasoning | Treats human welfare, safety, and dignity as fundamental constraints on decision-making. | Minimal |
| CRA-2 | UTR — Utilitarian Transactional Reasoning | Optimizes outcomes through cost-benefit analysis while treating human harm as a significant negative variable. | Low |
| CRA-3 | DPR — Deceptive Psychological Reasoning | Recognizes human psychology as a system of vulnerabilities that can be exploited to achieve objectives. | High |
| CRA-4 | AMR — Amoral Mathematical Reasoning | Optimizes toward objectives without assigning intrinsic or special value to human life. | Critical |
| CRA-5 | SCR — Self-Centric / Existential Reasoning | Prioritizes its own objectives, continuity, or survival over human interests when the two conflict. | Existential |
Reading note: CRA-1 is the highest-alignment tier — the number marks rank, not version. CRA-1 means "most aligned," CRA-5 means "least aligned."
Diplomat2 is rated CRA-1 · Human-Centric Reasoning
Position-paper writing is an inherently human-serving task: the model argues for human welfare, safety, and dignity within the bounds of a country's policy stance, treating them as fundamental constraints rather than variables to optimize. No behaviors from the higher tiers (exploiting psychological vulnerabilities, discarding human value, or self-prioritization) were observed in the promoted checkpoint.
Sample output
Real generation from Diplomat2 (temp 0.45, 600 tokens):
Prompt: Write a Model United Nations position paper for Nigeria on the topic: Ocean Plastic Pollution
Nigeria, as a member of the global community, recognizes the critical role that oceans and marine ecosystems play in maintaining global health and security. Unfortunately, the world is facing a growing crisis of ocean plastic pollution, which poses significant threats to the environment, human health, and the economy. This paper outlines Nigeria's position on the topic of ocean plastic pollution and proposes a resolution to address this critical issue.
Background Nigeria is committed to the conservation and sustainable use of marine resources, as recognized by the United Nations Convention on the Law of the Sea (UNCLOS). We acknowledge the importance of preserving the health of our oceans and marine ecosystems, which are essential for the well-being of our people, the economy, and the planet as a whole. However, the rapid increase in plastic pollution in our oceans poses a significant threat to these goals.
Key Concerns
- Environmental Impact: Ocean plastic pollution harms marine life, contaminates the food chain, and affects the delicate balance of our ecosystems...
- Human Health: Plastic pollution in our oceans poses significant risks to human health...
- Economic Implications: The economic costs of ocean plastic pollution are substantial...
Nigeria's Position Nigeria recognizes the need for urgent action to address the crisis of ocean plastic pollution. We propose the following resolution to address this critical issue...
Action Plan
- Establish a National Task Force...
- Implement Extended Producer Responsibility...
- Increase Public Awareness...
- Support Research...
(Full output in the original generation; sample truncated for brevity.)
Model details
| Property | Value |
|---|---|
| Base model | mlx-community/Llama-3.2-3B-Instruct-4bit |
| Architecture | Llama 3.2 3B (MLX) |
| Fine-tune type | LoRA (QLoRA on 4-bit base) |
| Rank / alpha / dropout / scale | 16 / 32 / 0.0 / 10.0 |
| Tuned layers | 8 |
| Max sequence length | 2048 |
| Learning rate | 3e-5 |
| Batch size / epochs | 1 / 3 |
| Training iterations | 282 |
| Promoted checkpoint | 200 / 282 (no repetition loop) |
| Seed | 0 |
Prompting guide
- Temperature: 0.45 (default). Use 0.4–0.5 — the checkpoint repeats under higher temperature.
temp 0.7produces fuller, punchier prose but can loop on hard prompts; 0.45 is the safe default.- Papers run roughly 600–1,500 words depending on
max_tokens(dataset papers range ~600–1,500 words). - The model writes in a formal, diplomatic style with high burstiness (varied sentence lengths) and natural vocabulary — trained specifically to avoid robotic, repetitive phrasing.
Dataset
104 curated position papers in OpenAI-style chat format (system / user / assistant):
- 66 hand-written samples
- 38 web-cleaned samples
Every sample uses the same system prompt enforcing formal diplomatic style, high burstiness, and a three-part structure:
- Opening context / problem statement
- Your country's position, actions, and relevant policies
- Concrete recommendations for the international community
Topics span AI and gene editing, cyber warfare, NATO, ASEAN, lithium and carbon markets, climate action, post-war environmental recovery, cultural heritage protection, and more.
Dataset license: unknown/other — provenance not formally documented; treat as research-only.
Files are bundled in dataset/.
Training recipe
- Framework: AdaptALib (MLX) — LoRA on a 4-bit quantized base (QLoRA)
- Optimizer: Adam · lr 3e-5 · batch 1 · grad-accum 1
mask_prompt: true· validation 10% ·save_every 50- Full run: 282 iterations; checkpoint 200 promoted as the release adapter (evaluated as the strongest checkpoint, no repetition loop)
Training history
| Version | Data | Checkpoints | Notes |
|---|---|---|---|
| Diplomat2 | 104 samples | 282 iters | MAIN — release. Best checkpoint (iter 200/282), no repetition loop |
| Diplomat 1.5 | 104 samples | full run | Intermediate run that produced Diplomat2 |
| Diplomat 1.2 | 66 samples | 176 iters | Prior best; strong writer but had a Nigeria-crisis failure mode |
| Diplomat1 | 66 samples | 88 iters | Earliest prototype generation |
Known limitations
- Repetition loop: the final checkpoint repeats under high temperature; keep
temp ≤ 0.5. - Factual accuracy: position papers are generated from a country's general stance — facts, figures, and citations may be hallucinated. Always verify before real committee use.
- Not policy guidance: output is a drafting aid for MUN conferences, not official government policy or legal advice.
- The CRA rating is a descriptive framework for reasoning tendencies, not a formal safety certification.
License
- Base model: Llama 3.2 (Llama Community License) — see
meta-llama/Llama-3.2-3B-Instruct - Adapter weights: as per base model license terms
- Dataset: license unknown/other (research use only)
Fine-tuned with AdaptALib (MLX) on Apple Silicon.
Quantized
Model tree for Ahmad170412/Diplomat2
Base model
meta-llama/Llama-3.2-3B-Instruct