• About Us
  • Privacy Policy
  • Disclaimer
  • Contact Us
AimactGrow
  • Home
  • Technology
  • AI
  • SEO
  • Coding
  • Gaming
  • Cybersecurity
  • Digital marketing
No Result
View All Result
  • Home
  • Technology
  • AI
  • SEO
  • Coding
  • Gaming
  • Cybersecurity
  • Digital marketing
No Result
View All Result
AimactGrow
No Result
View All Result

Design a Full Multimodal RLVR Pipeline with Open-MM-RL, Imaginative and prescient-Language Prompting, Reward Scoring, and GRPO Export

Admin by Admin
May 26, 2026
Home AI
Share on FacebookShare on Twitter


EXTRACT_PATS = [
   r"boxed{([^{}]+)}",
   r"finals+solutions*[:=]s*([^n]+)",
   r"solutions*[:=]s*([^n]+)",
]
def extract_final(textual content):
   if not textual content: return ""
   for p in EXTRACT_PATS:
       m = re.search(p, textual content, flags=re.IGNORECASE)
       if m: return m.group(1).strip().strip(".,;")
   strains = [l.strip() for l in str(text).strip().splitlines() if l.strip()]
   return strains[-1] if strains else ""
def latex_to_sympy(s):
   s = (s or "").strip().strip("$").strip()
   s = re.sub(r"^[[(]", "", s); s = re.sub(r"[])]$", "", s)
   s = (s.exchange("pi", "pi").exchange("cdot", "*").exchange("instances", "*")
          .exchange(",", "").exchange(";", "").exchange("!", ""))
   s = re.sub(r"fracs*{([^{}]+)}s*{([^{}]+)}", r"((1)/(2))", s)
   s = re.sub(r"sqrts*{([^{}]+)}", r"sqrt(1)", s)
   s = s.exchange("^", "**")
   s = re.sub(r"[a-zA-Z]+", "", s)
   s = s.exchange("{", "(").exchange("}", ")")
   return s
def grade(pred, gold, tol=1e-4):
   """Verifiable reward in [0,1]: actual > numeric > sympy-symbolic > partial."""
   if pred is None or gold is None: return 0.0
   p = extract_final(str(pred)).strip()
   g = str(gold).strip()
   norm = lambda x: re.sub(r"s+", "", x.decrease()).strip("$.,;[]()")
   if norm(p) == norm(g): return 1.0
   def to_float(x):
       attempt: return float(latex_to_sympy(x))
       besides Exception:
           attempt: return float(sp.sympify(latex_to_sympy(x)).evalf())
           besides Exception: return None
   fp, fg = to_float(p), to_float(g)
   if fp will not be None and fg will not be None:
       if abs(fp - fg) / max(1.0, abs(fg)) < tol: return 1.0
   attempt:
       ep = sp.sympify(latex_to_sympy(p)); eg = sp.sympify(latex_to_sympy(g))
       if sp.simplify(ep - eg) == 0: return 1.0
   besides Exception:
       cross
   if norm(g) and norm(g) in norm(p): return 0.5
   return 0.0
print("n=== Grader sanity checks ===")
for pred, gold, need in [
   ("The answer is boxed{120}",            "[120]",            1.0),
   ("After computing: 7396 pi",            "7396pi",         1.0),
   ("Closing reply: -71/4",                   "-frac{71}{4}",   1.0),
   ("Subsequently the result's 0.0074",        "0.0074",           1.0),
   ("Closing reply: nucleus accumbens",       "Nucleus accumbens",1.0),
   ("I do not know",                          "12",               0.0),
]:
   print(f"  pred={pred[:38]!r:42s} gold={gold!r:22s} -> r={grade(pred, gold)}  (need {need})")
SYSTEM = ("You're a STEM knowledgeable fixing multimodal reasoning issues. "
         "You will note a query and a number of figures. "
         "Cause step-by-step, then finish with precisely one line:n"
         "Closing reply: ")
def build_prompt(ex):
   img_tags = "n".be part of(f"[Image {i+1}]" for i in vary(len(ex["images"])))
   return f"{SYSTEM}nn{img_tags}nnQuestion:n{ex['question']}nnLet's suppose step-by-step."
print("n=== Instance immediate (truncated) ===")
print(build_prompt(ds[0])[:600], "...n")
Tags: CompleteDesignexportGRPOMultimodalOpenMMRLPipelinePromptingRewardRLVRScoringvisionlanguage
Admin

Admin

Next Post
The best way to Unlock the Bioscanner in Subnautica 2

The best way to Unlock the Bioscanner in Subnautica 2

Leave a Reply Cancel reply

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

Recommended.

Extra Collins Aerospace Hacking Fallout

Extra Collins Aerospace Hacking Fallout

October 28, 2025
ARC Raiders Must Launch a Customized PS5 DualSense

ARC Raiders Must Launch a Customized PS5 DualSense

January 20, 2026

Trending.

Nsfw Chatgpt Options – Examples I’ve Used

Nsfw Chatgpt Options – Examples I’ve Used

October 13, 2025
ModeloRAT and Mistic Backdoor Exercise Linked to Ransomware Preliminary Entry Dealer

ModeloRAT and Mistic Backdoor Exercise Linked to Ransomware Preliminary Entry Dealer

June 24, 2026
Cisco Catalyst SD-WAN Zero-Day CVE-2026-20245 Exploited to Acquire Root Entry

Cisco Catalyst SD-WAN Zero-Day CVE-2026-20245 Exploited to Acquire Root Entry

June 25, 2026
Web Information Caps Defined: The right way to Keep away from Overages and Discover Limitless Plans

Web Information Caps Defined: The right way to Keep away from Overages and Discover Limitless Plans

September 23, 2025
Hijacked npm and Go Packages Use VS Code Duties to Deploy Python Infostealer

Hijacked npm and Go Packages Use VS Code Duties to Deploy Python Infostealer

June 29, 2026

AimactGrow

Welcome to AimactGrow, your ultimate source for all things technology! Our mission is to provide insightful, up-to-date content on the latest advancements in technology, coding, gaming, digital marketing, SEO, cybersecurity, and artificial intelligence (AI).

Categories

  • AI
  • Coding
  • Cybersecurity
  • Digital marketing
  • Gaming
  • SEO
  • Technology

Recent News

High 10 Greatest Cloud Safety Suppliers

High 10 Greatest Cloud Safety Suppliers

July 11, 2026
The 4 S’s of YouTube Success

The 4 S’s of YouTube Success

July 11, 2026
  • About Us
  • Privacy Policy
  • Disclaimer
  • Contact Us

© 2025 https://blog.aimactgrow.com/ - All Rights Reserved

No Result
View All Result
  • Home
  • Technology
  • AI
  • SEO
  • Coding
  • Gaming
  • Cybersecurity
  • Digital marketing

© 2025 https://blog.aimactgrow.com/ - All Rights Reserved