MOTHER_CORE_V3 / README.md
MediaStreamAI's picture
Update README.md
0355fca verified
|
raw
history blame contribute delete
5.12 kB
---
language:
- en
- cy
- ga
- gd
license: other
library_name: transformers
tags:
- mother-core
- agentic
- tool-use
- reasoning
- rag
- uk-sovereign
pipeline_tag: text-generation
base_model:
- MediaStreamAI/MOTHER_CORE_V3
---
# MOTHER CORE V3
Sovereign UK reasoning + **agentic tool-calling** model by **MediaStream AI (MSAI)**.
V3 fuses multi-step agent orchestration, retrieval-grounded answering, and UK-domain
reasoning into a single ~6.9B model, served with `trust_remote_code`.
## Eval (105-task agentic benchmark)
| Version | Score | Degeneration |
|---|---|---|
| V2 (chunk 0600) | 51 / 105 (49%) | — |
| **V3 (chunk 1550)** | **81 / 105 (77%)** | **2%** |
+17 over V2; clean tool-call termination (degeneration 12% to 2%). Per-bucket:
arithmetic 4/4, knowledge 5/5, identity 5/6, retrieval 9/11, comms/email 11/15,
doc-generate 7/9, calendar 5/8, crm 6/12, format-export 8/20 (file-format routing
is the known weak spot, being addressed in V3.1).
## Architecture
Custom `MotherCoreModel` (requires `trust_remote_code=True`):
| | |
|---|---|
| Parameters | ~6.9B (6.88B) |
| Layers | 48 |
| Hidden dim | 3072 |
| Attention | 24 heads / 6 KV heads (GQA) |
| FFN | 4x (SwiGLU) |
| Max sequence | 4096 |
| Positional | RoPE (theta 10000) |
| Norm | RMSNorm (eps 1e-5) |
| Vocab | 50258 (SentencePiece) |
| Precision | bf16 |
| Special tokens | BOS=1, EOS=2, PAD=0 |
## Capabilities by agent group
Trained on ~2.2M records across 8 capability groups (36 agent types).
| Group | Area | Scope |
|---|---|---|
| A | Arithmetic & math | calculator-tool use, step-by-step math CoT |
| B | Reasoning & science | multi-domain step reasoning, science QA |
| C | Knowledge & UK languages | UK knowledge, identity, Welsh / Irish / Scottish Gaelic |
| D | Core agents & calc | general agent execution, calc tools, vertical agents |
| E | RAG, chat & memory | retrieval (cite/synthesise/no-tool/fallback), multi-turn chat, memory |
| F | Web, composition & recovery | web search, multi-tool composition, error recovery |
| G | Orchestration & workflows | agent chains (2/3/5-step), CoT planning/replan, disambiguation, unsafe-refusal, workflows (invoice, onboarding, report, meeting) |
| H | Documents, code, verify & plan | document & code generation, args-validation, verifier loops, DAG execution, planner/executor/policy agents |
### Tool surface
Calendar (`gcal_*`/`mscal_*`), email (`gmail_*`/`outlook_*`), CRM
(`highlevel_*`/`mailchimp_*`/`activecampaign_*`/`kartra_*`), docs research
(`gdrive_search`/`notion_search`/`gsheets_read`), tasks
(`asana_*`/`todoist_*`/`gtasks_*`/`slack_post`), meetings
(`fireflies_*`/`fathom_get_summary`), document generation
(`doc_create_{pdf,word,excel,csv,json,html,markdown,pptx,...}`), code generation
(`code_generate_{python,js,sql,shell}`), and finance/compliance/insurance/
regulatory/accounts/risk verticals.
## Inference
Loads with `trust_remote_code=True`. bf16, ~14 GB VRAM.
```python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
REPO = "MediaStreamAI/MOTHER_CORE_V3"
tok = AutoTokenizer.from_pretrained(REPO, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
REPO, trust_remote_code=True, torch_dtype=torch.bfloat16, device_map="auto"
).eval()
def generate(message, max_new_tokens=256):
prompt = f"Question:\n\n{message}\n\nAnswer:"
ids = tok(prompt, return_tensors="pt").input_ids.to(model.device)
out = model.generate(ids, max_new_tokens=max_new_tokens, do_sample=False,
repetition_penalty=1.2, no_repeat_ngram_size=4,
pad_token_id=tok.pad_token_id)
return tok.decode(out[0][ids.shape[1]:], skip_special_tokens=True).strip()
print(generate("What is the capital of Scotland?")) # -> Edinburgh is the capital of Scotland.
Agentic tool-calling
The model emits a single TOOL_CALL tool(args). Your runtime executes the tool
and feeds the result back as a separate TOOL_RESULT {...} turn; the model then
continues. It never fabricates the result — you supply it.
USER: Build me an Excel file for capacity tracking
ASSISTANT: TOOL_CALL doc_create_excel(title="capacity tracking", columns=["item","value"])
TOOL: TOOL_RESULT {"success": true, "file": {"url": "...", "filename": "document.xlsx"}}
ASSISTANT: Done - document.xlsx is ready. You can download it here: ...
Loop: detect TOOL_CALL, run it, append TOOL_RESULT, call generate again with
the transcript. Use greedy/deterministic decoding (sampling degrades tool-call
validity); keep repetition_penalty=1.2, no_repeat_ngram_size=4.
Limitations & safety
format_export routing (Excel/CSV/etc.) still mis-routes ~half the time (V3.1).
Knowledge is fixed at training time; verify facts.
Non-weapon posture: observation + human-in-the-loop only. Refuses forgery,
fraud, phishing and destructive actions; asks for confirmation on irreversible
operations.
Provenance
MediaStream AI Limited — United Kingdom. Continued full fine-tune of the MOTHER
CORE line on an NVIDIA GB10 (DGX Spark); answer-only loss, balanced category
sampling, EOS-terminated targets, cosine LR warm-restart.