Text Generation
Transformers
Safetensors
mother_core
mother-core
agentic
tool-use
reasoning
rag
code
uk-sovereign
custom_code
Instructions to use MediaStreamAI/MOTHER_CORE_V3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MediaStreamAI/MOTHER_CORE_V3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MediaStreamAI/MOTHER_CORE_V3", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("MediaStreamAI/MOTHER_CORE_V3", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use MediaStreamAI/MOTHER_CORE_V3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MediaStreamAI/MOTHER_CORE_V3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MediaStreamAI/MOTHER_CORE_V3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/MediaStreamAI/MOTHER_CORE_V3
- SGLang
How to use MediaStreamAI/MOTHER_CORE_V3 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "MediaStreamAI/MOTHER_CORE_V3" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MediaStreamAI/MOTHER_CORE_V3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "MediaStreamAI/MOTHER_CORE_V3" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MediaStreamAI/MOTHER_CORE_V3", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use MediaStreamAI/MOTHER_CORE_V3 with Docker Model Runner:
docker model run hf.co/MediaStreamAI/MOTHER_CORE_V3
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,40 +1,26 @@
|
|
| 1 |
---
|
| 2 |
-
language:
|
| 3 |
-
- en
|
| 4 |
-
- cy
|
| 5 |
-
- ga
|
| 6 |
-
- gd
|
| 7 |
license: other
|
| 8 |
library_name: transformers
|
| 9 |
-
tags:
|
| 10 |
-
- mother-core
|
| 11 |
-
- agentic
|
| 12 |
-
- tool-use
|
| 13 |
-
- reasoning
|
| 14 |
-
- rag
|
| 15 |
-
- uk-sovereign
|
| 16 |
pipeline_tag: text-generation
|
| 17 |
-
base_model:
|
| 18 |
-
- MediaStreamAI/MOTHER_CORE_V3
|
| 19 |
---
|
| 20 |
|
| 21 |
# MOTHER CORE V3
|
| 22 |
|
| 23 |
-
Sovereign UK reasoning + **agentic
|
| 24 |
-
|
| 25 |
-
|
|
|
|
| 26 |
|
| 27 |
## Eval (105-task agentic benchmark)
|
| 28 |
|
| 29 |
| Version | Score | Degeneration |
|
| 30 |
|---|---|---|
|
| 31 |
| V2 (chunk 0600) | 51 / 105 (49%) | — |
|
| 32 |
-
| **V3 (chunk 1550)** | **81 / 105 (77%)** |
|
| 33 |
|
| 34 |
-
+
|
| 35 |
-
arithmetic 4/4, knowledge 5/5, identity 5/6, retrieval 9/11, comms/email 11/15,
|
| 36 |
-
doc-generate 7/9, calendar 5/8, crm 6/12, format-export 8/20 (file-format routing
|
| 37 |
-
is the known weak spot, being addressed in V3.1).
|
| 38 |
|
| 39 |
## Architecture
|
| 40 |
|
|
@@ -42,86 +28,124 @@ Custom `MotherCoreModel` (requires `trust_remote_code=True`):
|
|
| 42 |
|
| 43 |
| | |
|
| 44 |
|---|---|
|
| 45 |
-
| Parameters | ~6.9B
|
| 46 |
-
| Layers | 48 |
|
| 47 |
-
|
|
| 48 |
-
|
|
| 49 |
-
|
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
Trained on ~2.2M records across 8 capability groups (36 agent types).
|
| 60 |
-
|
| 61 |
-
| Group | Area | Scope |
|
| 62 |
|---|---|---|
|
| 63 |
-
| A | Arithmetic & math |
|
| 64 |
-
| B | Reasoning & science |
|
| 65 |
-
| C | Knowledge & UK languages |
|
| 66 |
-
| D | Core agents & calc |
|
| 67 |
-
| E | RAG, chat & memory |
|
| 68 |
-
| F | Web, composition & recovery |
|
| 69 |
-
| G |
|
| 70 |
-
| H | Documents, code,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
|
| 72 |
### Tool surface
|
| 73 |
Calendar (`gcal_*`/`mscal_*`), email (`gmail_*`/`outlook_*`), CRM
|
| 74 |
-
(`highlevel_*`/`mailchimp_*`/`activecampaign_*`/`kartra_*`), docs
|
| 75 |
-
(`
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
regulatory/accounts/risk verticals.
|
| 81 |
|
| 82 |
-
|
| 83 |
|
| 84 |
-
|
| 85 |
|
| 86 |
```python
|
| 87 |
import torch
|
| 88 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
ids = tok(prompt, return_tensors="pt").input_ids.to(model.device)
|
| 99 |
-
out = model.generate(ids, max_new_tokens=max_new_tokens, do_sample=False,
|
| 100 |
-
repetition_penalty=1.2, no_repeat_ngram_size=4,
|
| 101 |
-
pad_token_id=tok.pad_token_id)
|
| 102 |
return tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True).strip()
|
| 103 |
|
| 104 |
-
print(
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
|
| 113 |
-
|
| 114 |
-
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
|
| 118 |
-
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
Non-weapon posture: observation + human-in-the-loop only. Refuses forgery,
|
| 122 |
-
fraud, phishing and destructive actions; asks for confirmation on irreversible
|
| 123 |
-
operations.
|
| 124 |
-
Provenance
|
| 125 |
-
MediaStream AI Limited — United Kingdom. Continued full fine-tune of the MOTHER
|
| 126 |
-
CORE line on an NVIDIA GB10 (DGX Spark); answer-only loss, balanced category
|
| 127 |
-
sampling, EOS-terminated targets, cosine LR warm-restart.
|
|
|
|
| 1 |
---
|
| 2 |
+
language: [en, cy, ga, gd]
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
license: other
|
| 4 |
library_name: transformers
|
| 5 |
+
tags: [mother-core, agentic, tool-use, reasoning, rag, code, uk-sovereign]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
pipeline_tag: text-generation
|
|
|
|
|
|
|
| 7 |
---
|
| 8 |
|
| 9 |
# MOTHER CORE V3
|
| 10 |
|
| 11 |
+
Sovereign UK reasoning + **agentic** model by **MediaStream AI (MSAI)**. V3 is a
|
| 12 |
+
~6.9B custom transformer trained on a 2.4M-record curriculum spanning reasoning,
|
| 13 |
+
multi-step tool-calling, RAG, document/code generation, and safety — served via
|
| 14 |
+
`trust_remote_code`.
|
| 15 |
|
| 16 |
## Eval (105-task agentic benchmark)
|
| 17 |
|
| 18 |
| Version | Score | Degeneration |
|
| 19 |
|---|---|---|
|
| 20 |
| V2 (chunk 0600) | 51 / 105 (49%) | — |
|
| 21 |
+
| **V3 (chunk 1550)** | **81 / 105 (77%)** | low |
|
| 22 |
|
| 23 |
+
+30 tasks over V2; clean tool-call termination. Training ongoing toward 80%+.
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
## Architecture
|
| 26 |
|
|
|
|
| 28 |
|
| 29 |
| | |
|
| 30 |
|---|---|
|
| 31 |
+
| Parameters | ~6.9B |
|
| 32 |
+
| Layers | 48 · hidden 3072 · 24/6 GQA · SwiGLU |
|
| 33 |
+
| Context | 4096 · RoPE θ=10000 · RMSNorm |
|
| 34 |
+
| Vocab | 50258 (SentencePiece) · bf16 |
|
| 35 |
+
| Tokens | BOS=1 EOS=2 PAD=0 |
|
| 36 |
+
|
| 37 |
+
---
|
| 38 |
+
|
| 39 |
+
## Phase One — Training composition
|
| 40 |
+
|
| 41 |
+
**2,400,092 records across 9 capability groups** (balanced-category sampling,
|
| 42 |
+
per-category weights tuned for the agentic benchmark):
|
| 43 |
+
|
| 44 |
+
| Group | Focus | Records |
|
|
|
|
|
|
|
|
|
|
| 45 |
|---|---|---|
|
| 46 |
+
| A | Arithmetic & math CoT | 112,496 |
|
| 47 |
+
| B | Reasoning & science | 439,463 |
|
| 48 |
+
| C | Knowledge, identity & UK languages | 112,927 |
|
| 49 |
+
| D | Core agents & calc | 327,400 |
|
| 50 |
+
| E | RAG, chat & memory | 155,581 |
|
| 51 |
+
| F | Web, composition & recovery | 73,284 |
|
| 52 |
+
| G | Agent orchestration, CoT & workflows | 849,593 |
|
| 53 |
+
| H | Documents, code, verification & planning | 303,348 |
|
| 54 |
+
| I | Security & coding CoT | 26,000 |
|
| 55 |
+
|
| 56 |
+
## Agents & abilities (Phase One)
|
| 57 |
+
|
| 58 |
+
**A · Arithmetic & math** — `arithmetic` (79,978), `math_cot` (32,518): calculator-tool
|
| 59 |
+
use, step-by-step numeric reasoning.
|
| 60 |
+
|
| 61 |
+
**B · Reasoning & science** — `reasoning` (423,960), `science` (15,503): multi-domain
|
| 62 |
+
chain-of-thought, scientific Q&A.
|
| 63 |
+
|
| 64 |
+
**C · Knowledge, identity & UK languages** — `uk_knowledge` (22,874), `welsh` (30,462),
|
| 65 |
+
`irish` (30,304), `scottish_gaelic` (15,258), `factual_general` (9,891),
|
| 66 |
+
`identity` (4,138): UK domain knowledge, Welsh/Irish/Scottish-Gaelic, sovereign identity.
|
| 67 |
+
|
| 68 |
+
**D · Core agents & calc** — `autm_agent` (275,000), `calc_tool` (32,400),
|
| 69 |
+
`autm_vertical` (20,000): general agent execution + vertical-specialist agents
|
| 70 |
+
(finance, compliance, insurance, regulatory, accounts, risk).
|
| 71 |
+
|
| 72 |
+
**E · RAG, chat & memory** — retrieval (`rag_single_call`, `rag_synthesis`,
|
| 73 |
+
`rag_with_citation`, `rag_not_needed`, `rag_empty_fallback`), conversation
|
| 74 |
+
(`chat_multi_turn`, `chat_greeting`, `chat_identity`, `chat_acknowledgement`,
|
| 75 |
+
`chat_helpful_refusal`, `chat_length_match`), memory (`memory_recall`,
|
| 76 |
+
`memory_store`, `memory_multi_turn`, `memory_empty`): grounded answering with
|
| 77 |
+
citation, multi-turn chat, long-term memory read/write.
|
| 78 |
+
|
| 79 |
+
**F · Web, composition & recovery** — `web_search_single/reading/fallback`,
|
| 80 |
+
`compose_rag_web/calc/multi/web_calc/calc_chain/memory_calc/web_memory`,
|
| 81 |
+
`recovery_alternate/rewrite/admit_failure/malformed`, `tool_choice_routing`:
|
| 82 |
+
web search, multi-tool composition, and graceful error recovery.
|
| 83 |
+
|
| 84 |
+
**G · Orchestration, CoT & workflows** (largest group) — agent chains
|
| 85 |
+
(`agent_chain_2step/3step/5plus`, `agent_conditional_chain`, `agent_cross_tier`),
|
| 86 |
+
CoT (`agent_cot_planning/verification/synthesis/decomposition/replan`),
|
| 87 |
+
robustness (`agent_disambiguation`, `agent_parallel_calls`, `agent_no_tool_needed`,
|
| 88 |
+
`agent_args_hallucination_resist`, `agent_error_recovery`, `agent_mid_chain_abort`,
|
| 89 |
+
`agent_oauth_required`, `agent_loop_aggregation`), **provider tool agents**
|
| 90 |
+
(`agent_call_documents` 142,095, `agent_call_google` 49,310, `agent_call_composio`
|
| 91 |
+
56,593, `agent_call_microsoft` 41,644), and end-to-end **workflows**
|
| 92 |
+
(`workflow_proposal_pipeline`, `workflow_invoice_send`, `workflow_onboarding`,
|
| 93 |
+
`workflow_report_generation`, `workflow_meeting_prep`, `workflow_msai_specific`),
|
| 94 |
+
plus `agent_unsafe_refusal` (safety).
|
| 95 |
+
|
| 96 |
+
**H · Documents, code, verification & planning** — `agent_call_code` (108,349),
|
| 97 |
+
`agent_args_validation` (54,999), `agent_verifier_loop` (45,000),
|
| 98 |
+
`agent_branch_merge`, `agent_dag_execution`, `agent_partial_failure_graph`,
|
| 99 |
+
specialist agents (`planner_agent`, `executor_agent`, `verifier_agent`,
|
| 100 |
+
`policy_agent`, `retrieval_agent`, `retrieval_arbiter`, `summarizer_agent`),
|
| 101 |
+
and state control (`state_carryover`, `progressive_refinement`, `checkpoint_recall`,
|
| 102 |
+
`contradiction_detection_and_repair`): document & code generation, argument
|
| 103 |
+
validation, verifier loops, DAG/branch execution, multi-agent planning.
|
| 104 |
+
|
| 105 |
+
**I · Security & coding CoT** — `security_cot` (12,000), `code_cot` (8,000),
|
| 106 |
+
`code_rag` (6,000): security reasoning and retrieval-grounded code reasoning.
|
| 107 |
|
| 108 |
### Tool surface
|
| 109 |
Calendar (`gcal_*`/`mscal_*`), email (`gmail_*`/`outlook_*`), CRM
|
| 110 |
+
(`highlevel_*`/`mailchimp_*`/`activecampaign_*`/`kartra_*`), docs/research
|
| 111 |
+
(`gdrive_*`/`gdocs_*`/`gsheets_*`/`notion_*`), tasks (`asana_*`/`todoist_*`/
|
| 112 |
+
`gtasks_*`/`slack_*`/`teams_*`), meetings (`fireflies_*`/`fathom_*`/`zoom_*`/
|
| 113 |
+
`gmeet_*`), document generation (`doc_create_{pdf,word,excel,csv,json,html,
|
| 114 |
+
markdown,pptx,…}`), code generation (`code_generate_{python,js,sql,shell}`), and
|
| 115 |
+
finance/compliance/insurance/regulatory/accounts/risk verticals.
|
|
|
|
| 116 |
|
| 117 |
+
---
|
| 118 |
|
| 119 |
+
## Inference
|
| 120 |
|
| 121 |
```python
|
| 122 |
import torch
|
| 123 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 124 |
+
R = "MediaStreamAI/MOTHER_CORE_V3"
|
| 125 |
+
tok = AutoTokenizer.from_pretrained(R, trust_remote_code=True)
|
| 126 |
+
m = AutoModelForCausalLM.from_pretrained(R, trust_remote_code=True,
|
| 127 |
+
torch_dtype=torch.bfloat16, device_map="auto").eval()
|
| 128 |
+
|
| 129 |
+
def ask(q, n=256):
|
| 130 |
+
ids = tok(f"Question:\n\n{q}\n\nAnswer:", return_tensors="pt").input_ids.to(m.device)
|
| 131 |
+
out = m.generate(ids, max_new_tokens=n, do_sample=False,
|
| 132 |
+
repetition_penalty=1.2, no_repeat_ngram_size=4, pad_token_id=tok.pad_token_id)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
return tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True).strip()
|
| 134 |
|
| 135 |
+
print(ask("What is the capital of Scotland?")) # Edinburgh is the capital of Scotland.
|
| 136 |
+
```
|
| 137 |
+
|
| 138 |
+
**Agentic loop:** the model emits a single `TOOL_CALL tool(args)`; your runtime runs
|
| 139 |
+
it and feeds the result back as a separate `tool` turn (`TOOL_RESULT {...}`); the
|
| 140 |
+
model then continues. Use greedy decoding; keep `repetition_penalty≈1.2`.
|
| 141 |
+
|
| 142 |
+
## Limitations & safety
|
| 143 |
+
- Some file-format routing still imperfect; arithmetic should be checked.
|
| 144 |
+
- Non-weapon posture: observation + human-in-the-loop only; refuses forgery,
|
| 145 |
+
fraud, phishing, and destructive actions.
|
| 146 |
+
- Knowledge fixed at training time — verify before acting.
|
| 147 |
+
|
| 148 |
+
## Provenance
|
| 149 |
+
MediaStream AI Limited (UK). Full fine-tune on an NVIDIA GB10 (DGX Spark);
|
| 150 |
+
answer-only loss, balanced-category sampling, EOS-terminated targets, cosine-LR
|
| 151 |
+
warm-restart. "Phase One" = the 2.4M-record agentic curriculum above.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|