• bitcoinBitcoin(BTC)$79,544.00-0.99%
  • Midas Fasanara Global EuroMidas Fasanara Global Euro(MGLOEURO)$111,813.00-0.36%
  • ethereumEthereum(ETH)$2,302.33-1.17%
  • tetherTether(USDT)$1.00-0.04%
  • binancecoinBNB(BNB)$735.66-0.29%
  • rippleXRP(XRP)$1.290.37%
  • usd-coinUSDC(USDC)$1.00-0.02%
  • solanaSolana(SOL)$99.57-1.90%
  • tronTRON(TRX)$0.327183-1.05%
  • Figure HelocFigure Heloc(FIGR_HELOC)$1.040.00%
  • zcashZcash(ZEC)$1,242.490.66%
  • HyperliquidHyperliquid(HYPE)$77.260.08%
  • dogecoinDogecoin(DOGE)$0.076919-0.35%
  • moneroMonero(XMR)$594.470.81%
  • USDSUSDS(USDS)$1.000.00%
  • whitebitWhiteBIT Coin(WBT)$76.38-1.27%
  • chainlinkChainlink(LINK)$11.27-1.67%
  • leo-tokenLEO Token(LEO)$9.040.06%
  • cardanoCardano(ADA)$0.202270-1.15%
  • stellarStellar(XLM)$0.166969-1.29%
  • nearNEAR Protocol(NEAR)$4.42-3.06%
  • bitcoin-cashBitcoin Cash(BCH)$280.590.47%
  • RainRain(RAIN)$0.007039-13.15%
  • Ethena USDeEthena USDe(USDE)$1.00-0.03%
  • daiDai(DAI)$1.000.00%
  • uniswapUniswap(UNI)$6.99-0.35%
  • litecoinLitecoin(LTC)$55.94-1.37%
  • USD1USD1(USD1)$1.000.00%
  • avalanche-2Avalanche(AVAX)$8.73-2.39%
  • CantonCanton(CC)$0.096048-5.07%
  • suiSui(SUI)$0.91-1.38%
  • the-open-networkGram (prev. Toncoin)(GRAM)$1.21-0.50%
  • hedera-hashgraphHedera(HBAR)$0.075635-2.36%
  • tether-goldTether Gold(XAUT)$3,993.68-0.49%
  • Global DollarGlobal Dollar(USDG)$1.000.00%
  • paypal-usdPayPal USD(PYUSD)$1.00-0.02%
  • quant-networkQuant(QNT)$201.40-3.39%
  • BittensorBittensor(TAO)$246.82-1.75%
  • shiba-inuShiba Inu(SHIB)$0.000005-0.60%
  • EthenaEthena(ENA)$0.199756-3.80%
  • crypto-com-chainCronos(CRO)$0.052365-2.83%
  • Ripple USDRipple USD(RLUSD)$1.00-0.01%
  • Ondo US Dollar YieldOndo US Dollar Yield(USDY)$1.150.10%
  • Circle USYCCircle USYC(USYC)$1.140.01%
  • MemeCoreMemeCore(M)$1.000.12%
  • okbOKB(OKB)$107.68-1.02%
  • BlackRock USD Institutional Digital Liquidity FundBlackRock USD Institutional Digital Liquidity Fund(BUIDL)$1.000.00%
  • BitwayBitway(BTW)$1.37-11.30%
  • aaveAave(AAVE)$130.04-4.21%
  • OndoOndo(ONDO)$0.404680-1.06%
TradePoint.io
  • Main
  • AI & Technology
  • Stock Charts
  • Market & News
  • Business
  • Finance Tips
  • Trade Tube
  • Blog
  • Shop
No Result
View All Result
TradePoint.io
No Result
View All Result

Build Recurrent-Depth Transformers with OpenMythos for MLA, GQA, Sparse MoE, and Loop-Scaled Reasoning

May 22, 2026
in AI & Technology
Reading Time: 1 min read
A A
Build Recurrent-Depth Transformers with OpenMythos for MLA, GQA, Sparse MoE, and Loop-Scaled Reasoning
ShareShareShareShareShare
def build_model(attn_type: str = "mla", max_loop_iters: int = 8) -> tuple:
   """Build a small OpenMythos model. Two attention variants supported.
   MLA  — Multi-Latent Attention (compressed KV cache, DeepSeek-V2 style)
   GQA  — Grouped-Query Attention (fewer KV heads than Q heads)
   """
   base = dict(
       vocab_size       = 64,
       dim              = 128,
       n_heads          = 4,
       max_seq_len      = 32,
       max_loop_iters   = max_loop_iters,
       prelude_layers   = 1,
       coda_layers      = 1,
       n_experts        = 4,
       n_shared_experts = 1,
       n_experts_per_tok= 2,
       expert_dim       = 64,
       lora_rank        = 8,
       attn_type        = attn_type,
   )
   if attn_type == "gqa":
       cfg = MythosConfig(**base, n_kv_heads=2)
   else:
       cfg = MythosConfig(
           **base, n_kv_heads=4,
           kv_lora_rank=32, q_lora_rank=32,
           qk_rope_head_dim=16, qk_nope_head_dim=16, v_head_dim=16,
       )
   model = OpenMythos(cfg).to(device)
   return model, cfg
model_mla, cfg_mla = build_model("mla")
model_gqa, cfg_gqa = build_model("gqa")
def n_params(m): return sum(p.numel() for p in m.parameters())
print(f"\n[MLA] params: {n_params(model_mla):>10,}")
print(f"[GQA] params: {n_params(model_gqa):>10,}")
def spectral_radius(model):
   A = model.recurrent.injection.get_A().detach().cpu()
   if A.dim() == 1:
       rho = A.abs().max().item()
   else:
       rho = torch.linalg.eigvals(A.float()).abs().max().item()
   return rho
print(f"\nρ(A) MLA: {spectral_radius(model_mla):.4f}   (must be < 1)")
print(f"ρ(A) GQA: {spectral_radius(model_gqa):.4f}   (must be < 1)")
ids = torch.randint(0, cfg_mla.vocab_size, (2, 16), device=device)
with torch.no_grad():
   logits = model_mla(ids, n_loops=4)
   gen    = model_mla.generate(ids, max_new_tokens=4, n_loops=8)
print(f"\nForward logits shape:  {tuple(logits.shape)}")
print(f"Generation shape:      {tuple(gen.shape)}")

Credit: Source link

YOU MAY ALSO LIKE

Bitdefender Launches GravityZone Exposure Management to Map Attack Paths and Reduce Risk – Unite.AI

OpenAI Announces New Discoveries In Mathematics, Computer Science And Physics

ShareTweetSendSharePin

Related Posts

Bitdefender Launches GravityZone Exposure Management to Map Attack Paths and Reduce Risk – Unite.AI
AI & Technology

Bitdefender Launches GravityZone Exposure Management to Map Attack Paths and Reduce Risk – Unite.AI

October 27, 2026
OpenAI Announces New Discoveries In Mathematics, Computer Science And Physics
AI & Technology

OpenAI Announces New Discoveries In Mathematics, Computer Science And Physics

October 27, 2026
CoreWeave Activates Denmark AI Capacity and Extends Global Network Backbone – Unite.AI
AI & Technology

CoreWeave Activates Denmark AI Capacity and Extends Global Network Backbone – Unite.AI

October 27, 2026
IBM Brings Governed Identity and Credential Controls to AI Agents – Unite.AI
AI & Technology

IBM Brings Governed Identity and Credential Controls to AI Agents – Unite.AI

October 27, 2026
Next Post
Motorsports world mourns the unexpected loss of NASCAR legend Kyle Busch – Motorsport.com

Motorsports world mourns the unexpected loss of NASCAR legend Kyle Busch - Motorsport.com

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

No Result
View All Result
Giant sinkhole partially swallows Spectrum van

Giant sinkhole partially swallows Spectrum van

October 25, 2026
Cowboys vs. Eagles score, live updates: Saquon Barkley returns as Eagles, without Jalen Hurts, try to snap 4-game skid in NFC East showdown – Yahoo Sports

Cowboys vs. Eagles score, live updates: Saquon Barkley returns as Eagles, without Jalen Hurts, try to snap 4-game skid in NFC East showdown – Yahoo Sports

October 27, 2026
OpenAI employee arrested over hidden listening device

OpenAI employee arrested over hidden listening device

October 26, 2026

About

Learn more

Our Services

Legal

Privacy Policy

Terms of Use

Bloggers

Learn more

Article Links

Contact

Advertise

Ask us anything

©2020- TradePoint.io - All rights reserved!

Tradepoint.io, being just a publishing and technology platform, is not a registered broker-dealer or investment adviser. So we do not provide investment advice. Rather, brokerage services are provided to clients of Tradepoint.io by independent SEC-registered broker-dealers and members of FINRA/SIPC. Every form of investing carries some risk and past performance is not a guarantee of future results. “Tradepoint.io“, “Instant Investing” and “My Trading Tools” are registered trademarks of Apperbuild, LLC.

This website is operated by Apperbuild, LLC. We have no link to any brokerage firm and we do not provide investment advice. Every information and resource we provide is solely for the education of our readers. © 2020 Apperbuild, LLC. All rights reserved.

No Result
View All Result
  • Main
  • AI & Technology
  • Stock Charts
  • Market & News
  • Business
  • Finance Tips
  • Trade Tube
  • Blog
  • Shop

© 2023 - TradePoint.io - All Rights Reserved!