Field SOP
Field SOP

Intern-S2 in practice: from free API to scientific workflows

A hands-on SOP for accessing Intern-S2: for individuals and small teams the realistic path is the free API (chat.intern-ai.org.cn for online use, internlm.intern-ai.org.cn/api/strategy for quota), while institutions with compute can run the HuggingFace weights at internlm/Intern-S2-397B. It gives a three-way access comparison table, a minimal runnable Python call for the free API, an HF inference skeleton, two copy-paste prompt templates for scientific long-horizon tasks (molecule binder design, materials structure generation), plus Memory Decoder mounting notes and a ten-item pitfall list (free-tier rate limits, 397B out-of-memory, long-context truncation, the Preview model's 2026-10-31 shutdown and migration). Bottom line: start free on the API, do not jump straight to self-hosting a 397B model.

Published September 17, 202611 min read
<!-- intern-s2-api-sop | sop | Intern-S2 in practice: from free API to scientific workflows -->

Intern-S2 is a 397B mixture-of-experts model fully open-sourced by Shanghai AI Laboratory in September 2026. Its headline strength is long scientific tasks: biomolecular interaction design, materials structure generation, competition and advanced mathematics long-horizon reasoning, and agent execution. For individuals and small teams the realistic path is not hosting 397B locally but using the free API. Institutions with compute can load HuggingFace weights for private deployment. Researchers can stack the Memory Decoder pluggable memory module to attach domain knowledge on top of a frozen base, with no retraining. This SOP gives the shortest path from zero to working: pick a route, claim quota, send the first request, run local inference, write prompts for long scientific tasks, mount the memory module, and ship to production while avoiding ten pitfalls.

Boundary note: steps are compiled from official README and release docs as of September 2026; commands and UI follow the official documentation. The Preview build is scheduled to shut down on 2026-10-31, so use official addresses for production.

This guide targets Chinese technical practitioners, including individuals and small teams, who want a working integration without reading every document. Where a command is uncertain, follow the official README.

Which path should you take

Not everyone needs the same path. Sort yourself into three buckets by compute and goal.

Bucket one, individual developers and small teams. You have no GPU fleet and do not want to maintain an inference cluster. Your goal is to validate ideas quickly and wire the model into your product. Take the free API: the web playground is five minutes away, and the API opens a free quota to all users, with higher quota on request. Zero ops, zero hardware cost.

Bucket two, universities, labs, and enterprises with compute. You own eight or more A100 or domestic cards, your data cannot leave the network, and you need private deployment or further development. Take HuggingFace weight inference with transformers, or ModelScope weights, on your own cluster. Note 397B is unfriendly locally and needs large memory or multi-card sharding.

Bucket three, researchers who need the model to become a domain expert. You hold private corpora in biology, materials, or mathematics, and you want the model to remember that knowledge long term without retraining the base. On top of the API or local weights, stack the Memory Decoder memory module to attach domain knowledge.

One line: validate ideas on the API, keep data on-prem with local weights, and gain durable domain memory with the memory module.

Cost reality: hosting 397B at full BF16 is roughly 800 GB of weights, so even an 80 GB card needs about ten of them before counting activation and intermediate state. For an individual that is a house-sized GPU budget, which is why the free API is not a compromise but the only sensible entry. Conversely, if your data must never leave the network, the API is off the table and local weights become mandatory regardless of cost.

Access methods at a glance

The table contrasts the three paths on barrier, compute, audience, and links.

MethodPathBarrierComputeFor whomLinks
Free APIWeb playground and coded callsRegister and claim free quotaNo local computeIndividuals, small teams, quick validationchat.intern-ai.org.cn; internlm.intern-ai.org.cn/api/strategy
HuggingFace weightstransformers loadCan write inference codeLarge memory, multi-cardInstitutions with compute, private usehuggingface.co/internlm/Intern-S2-397B
GitHub and ModelScopeSource and domestic weightsCan deployLarge memory, multi-cardDomestic compliance, further devgithub.com/InternLM/Intern-S1; modelscope.cn/models/Shanghai_AI_Laboratory/Intern-S2-397B

Routing advice: start on the free API to prove the scenario, then consider local weights once compute is justified. The memory module is mostly application-based for now, so define the task clearly on the API first.

Treat the table as a starting filter, not a commitment: most teams should begin on the free API, measure real latency and cost on their own workloads, and only move to local weights when the data or scale argument is concrete. The memory module sits on top of either route and does not change this decision.

Free API step by step

This is the most actionable section. Goal: get endpoint and key in ten minutes and send the first request.

Never commit the key to source control; if it appears in a repo, revoke and rotate it immediately, because free quotas are attractive targets for abuse.

Step 1, register and claim quota. Open the web playground at chat.intern-ai.org.cn and log in. The quota policy and application entry sit at internlm.intern-ai.org.cn/api/strategy: a free quota is open to all users, and higher quota needs a separate application. Claim the free one first; apply only when you need more.

Step 2, create a key. In the API console create an API key, copy and store it safely. The key shows only once, and you must revoke it immediately if it leaks.

Step 3, get endpoint and key. Set the key as an environment variable to avoid hardcoding it in code:

bash
export INTERN_S2_API_KEY="your-key"

The endpoint and exact path follow the official docs; below we use the placeholder https://chat.intern-ai.org.cn/...

Step 4, send the first request with Python. The minimal runnable snippet uses only requests:

python
import os
import requests

api_key = os.environ.get("INTERN_S2_API_KEY")
endpoint = "https://chat.intern-ai.org.cn/..."  # follow official docs

resp = requests.post(
    endpoint,
    headers={"Authorization": f"Bearer {api_key}", "Content-Type": "application/json"},
    json={"model": "intern-s2", "messages": [{"role": "user", "content": "Explain molecular docking in one sentence"}]},
)
print(resp.json())

A returned response means the link works. After that, swap the messages for your long scientific task.

The response follows the standard chat schema; the model output sits in choices, and a 4xx usually means a key or quota problem while a 5xx usually means server-side throttling, which you handle with backoff. For streaming, set stream to true and read chunks incrementally instead of waiting for the full reply. Log the request id so you can trace failures with the provider.

HuggingFace inference minimal example

Institutions with compute load weights with transformers for multimodal QA. The skeleton below has two caveats: 397B needs large memory or multi-card sharding, and a single card barely moves; the repo uses custom code, so trust_remote_code=True is required, following the official README.

python
from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained(
    "internlm/Intern-S2-397B",
    trust_remote_code=True,
    torch_dtype="auto",
    device_map="auto",  # multi-card sharding
)
tokenizer = AutoTokenizer.from_pretrained(
    "internlm/Intern-S2-397B", trust_remote_code=True
)

inputs = tokenizer("Describe the binding site in this molecular structure image", return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Practical notes: confirm total cluster memory first and estimate whether BF16 weights fit; if not, use multi-card device_map or quantization; for domestic accelerators watch framework and operator compatibility. Slow inference is normal, so set timeouts and retries for long tasks.

For a single node, prefer device_map="auto" with accelerate so layers spread across cards. If memory is still short, apply 4-bit or 8-bit quantization, understanding that it trades some accuracy for fit. Benchmark one representative prompt before batching, because long-context generation dominates latency and you should size the queue from measured numbers rather than guesses.

Prompt recipes for long scientific tasks

Intern-S2 shines at long-horizon reasoning and tool calling. The key is to break the task into goal, constraints, steps, and verification. Two copy-paste templates follow.

Template one, protein binder and molecular design:

text
You are a computational biologist. Task: design a binder for target protein [PDB ID].
Steps: 1) list key residues of the binding pocket and interaction types; 2) propose three candidate sequences with reasoning;
3) for each sequence assess binding affinity, solubility, and immunogenicity risk; 4) retrieve literature to cross-check with tools;
5) give the best candidate and next experimental step.
Constraints: every step cites verifiable evidence, and mark uncertainty explicitly.

Template two, materials structure generation:

text
You are a materials scientist. Task: design a crystal structure that meets [target band gap / conductivity / stability].
Steps: 1) set chemical constraints on element composition; 2) generate candidates and self-consistency check against physical rules;
3) call a compute tool to estimate properties; 4) compare three candidates and explain trade-offs; 5) output a synthesizable path.
Constraints: every number cites a source or estimation method, no fabrication.

How to use long reasoning plus tool calling: split the big task into steps, let the model reason first then call a tool at each step (retrieval, compute, lookup), feed the tool result back into the next step to form a loop, and finally ask it to output the reasoning chain to the conclusion, not just the answer. This sharply reduces factual drift on long tasks.

A third recipe is long mathematical reasoning: split a proof or calculation into sub-goals, ask the model for a lemma and justification at each step, and require a final summary. Intern-S2 is strong at competition and advanced math long-horizon reasoning; the trick is to ask for the full reasoning chain, not just the final answer. When the loop calls tools, persist each tool result and the model's interpretation of it, so you can audit where the chain diverged if the conclusion is wrong.

Mounting the Memory Decoder

The Memory Decoder is the pluggable memory module of Intern-S2 (such as Intern-MemDec-4B). Its core selling point is attaching domain knowledge on a frozen base, with no retraining, turning a general model into a domain expert at low cost. Conceptually, you prepare domain corpora, generate memory parameters, and mount them at designated layers of the base, taking effect together at inference.

In practice the memory module is mostly application-based for now. The exact application entry, mount method, and parameter format follow the official README, so do not copy third-party tutorials. Suggested path: define the domain task clearly on the free API first, accumulate enough corpora and an evaluation set, then apply to the official channel for the memory module, and after receiving mount instructions wire it into your own or authorized environment. The memory module is not a cure-all: corpus quality decides memory quality, and you still need an evaluation set to verify after mounting.

From an engineering view the value of the memory module is hot-swappability: one frozen base can switch expert identity by mounting different domain memories, and because the base stays frozen you avoid the training and regression cost of full fine-tuning. The trade-off is that the memory module itself must be maintained and iterated as corpora evolve, and you should version it like any other model artifact.

Productionizing and pitfalls

Ten pitfalls are most common when putting Intern-S2 into production. The quick-reference table gives symptom and fix for each.

PitfallSymptomFix
Free quota rate limitHigh-frequency calls throttledAdd backoff retry, stagger calls, apply for higher quota
397B memory blowupSingle card OOM, will not startMulti-card sharding, quantization, or switch to API
Long context truncationLong doc cut, info lostChunk, front-load summary, keep key context
Memory module not appliedDomain knowledge will not attachValidate on API first, then apply for module
Preview shutdownLinks dead on 2026-10-31Migrate to official address, watch announcements
Domestic accelerator fitOperator or framework mismatchTest operator coverage, use compatible backend
Official-flavored benchmarksMetric gaps from realityBuild own eval set, accept on real tasks
Long task timeoutInference too long, client dropsServer-side async, poll result, sensible timeout
Concurrency limitRequests crowd each otherRate-limit queue, cap concurrency
Key leak protectionKey in repo gets abusedEnv vars plus secret manager, revoke on leak

Production notes: the free API fits validation and prototypes; for live service mind rate limits, timeouts, keys, and logs; local weights need memory and concurrency monitoring; long scientific tasks should be asynchronous, with results stored and polled.

For domestic compliance, keep weights and data inside the approved accelerator pool and document the exact software stack so audits reproduce. Pin the model and memory-module versions in your deployment manifest, because silent upstream changes can shift scientific outputs in ways that matter for regulated work.

Also sample cost and latency for every long task and build your own evaluation set, accepting on real tasks rather than official leaderboards. For scientific tasks, factual correctness must be backed by reproducible experiments or literature cross-checks, never by the model's own claim alone. Add basic observability: record prompt tokens, output tokens, latency, and error rate per route, and alert when the free quota approaches its ceiling so prototypes do not silently break in production.

FAQ

Q1: How can an individual use it at zero cost?

Take the free API. Register at chat.intern-ai.org.cn to claim a free quota open to all users, with higher quota on request. Validate ideas in the web playground, then wire the API with Python, at zero hardware cost.

Q2: Can it run locally?

397B is unfriendly locally. A single card barely moves; it needs large memory or multi-card sharding and trust_remote_code. Individuals and small teams should skip local and prefer the free API; institutions with compute can consider HF weights or domestic private deployment.

Q3: What is the difference between API and HF weights?

The API is zero-ops, pay by quota, and fits quick validation. HF weights need your own compute to deploy, keep data on-prem, and allow further development, but ops and memory cost sit with you. Route choice depends on compute and compliance.

Q4: What does the memory module do, and how to apply?

It attaches domain knowledge on a frozen base, turning a general model into a domain expert with no retraining. It is mostly application-based now, and the exact entry and mount follow the official README. Define the task and corpora on the API first, then apply.

Q5: Versus GPT and Claude, what scenes fit?

Intern-S2 is strong at long scientific tasks (biomolecular, materials structure, competition math, agent execution) and domestic compliance scenes. General chit-chat and ecosystem maturity lag behind closed models, but scientific reasoning and data on-prem are its home turf. For regulated industries, the data-on-prem and open-weight posture is the deciding factor even when a closed model scores higher on a generic benchmark.

This article is AI-assisted and human-edited. Last updated: 2026-09-17

FAQ

How can an individual use it at zero cost?
Take the free API. Register at chat.intern-ai.org.cn to claim a free quota open to all users, with higher quota on request. Validate ideas in the web playground, then wire the API with Python, at zero hardware cost.
Can it run locally?
397B is unfriendly locally. A single card barely moves; it needs large memory or multi-card sharding and trust_remote_code. Individuals and small teams should skip local and prefer the free API; institutions with compute can consider HF weights or domestic private deployment.
What is the difference between API and HF weights?
The API is zero-ops, pay by quota, and fits quick validation. HF weights need your own compute to deploy, keep data on-prem, and allow further development, but ops and memory cost sit with you. Route choice depends on compute and compliance.
What does the memory module do, and how to apply?
It attaches domain knowledge on a frozen base, turning a general model into a domain expert with no retraining. It is mostly application-based now, and the exact entry and mount follow the official README. Define the task and corpora on the API first, then apply.
Versus GPT and Claude, what scenes fit?
Intern-S2 is strong at long scientific tasks (biomolecular, materials structure, competition math, agent execution) and domestic compliance scenes. General chit-chat and ecosystem maturity lag behind closed models, but scientific reasoning and data on-prem are its home turf. For regulated industries, the data-on-prem and open-weight posture is the deciding factor even when a closed model scores higher on a generic benchmark.

Related

Open Source

Intern-S2: 397B multimodal base with pluggable memory

In September 2026 Shanghai AI Lab fully open-sourced Intern-S2, a 397B MoE multimodal foundation model: code at github.com/InternLM/Intern-S1, weights at HuggingFace internlm/Intern-S2-397B, also on ModelScope. Its core Memory Decoder introduces a pluggable external memory module that decouples knowledge storage from reasoning, so switching domains needs no base retraining; the Mobius architecture lifts end-to-end inference efficiency nearly 4x. Per the lab's own reporting, general ability ranks among the top open-source models, it leads on scientific long-horizon tasks such as Biology-Instructions, Mol-Instructions and MP20, and matches Gemini 3.1 Pro on IMO-Proof and AdvancedMathBench. This piece notes plainly that 397B is impractical to self-host, and most benchmarks are lab-reported with limited independent replication.

Sep 17, 202610 min read
Field SOP

Wiring diagram-design into Claude Code: a hands-on SOP

A hands-on SOP for wiring the diagram-design diagram skill pack into a daily coding workflow, with commands taken verbatim from the project's official README. It runs in seven steps: first what the pack does and does not solve; then a per-host install and update command table (Claude Code's /plugin marketplace add and /plugin install, Codex's codex plugin marketplace add and plugin add, the copilot plugin family for GitHub Copilot, the droid plugin family with --scope user for Factory Droid, pi install plus /reload for Pi, a subdirectory URL import for Kiro, and a directory copy or symlink for OpenCode); then the first-run gate, which stops to ask when the default skin is untouched, and brand onboarding, which reads your site for palette and fonts, maps them to semantic tokens, checks WCAG AA contrast and emits a fidelity receipt; then drawing and self-check, with three copy-paste natural language prompts, the official six criteria for it working, and self_check.py printing OK as the pass condition; then export and import, covering the four dials, the diagram-only boundary, and what a fidelity ledger looks like; and multi-client brand isolation via named profiles plus a .diagram-design marker file. The seventh section is a ten-item pitfall table with symptom and cause for each: Claude Code disables auto-update by default for third-party marketplaces, Factory Droid tracks plugins by commit rather than manifest version, Pi has no auto refresh and needs pi update --extensions, Kiro copies rather than links, OpenCode copied installs never self-update, a legacy standalone npx skills add copy will not follow the Codex marketplace, a customized style-guide.md can be overwritten by package updates, the first PNG export fails without Playwright and Chromium, readers assume exports include the full layout, and motion HTML screenshots capture an intermediate frame. The core claim: the real barrier is not installation but update paths and output boundaries, and the fact that the official README spells out update commands per host is itself the signal that cross-host skill distribution and upgrades still have no unified answer.

Sep 15, 202611 min read
Field SOP

LingBot-World 2.0 Local Small Model Deployment SOP

A hands-on SOP for running LingBot-World 2.0's 1.3B causal-fast locally: environment and dependencies (torch 2.4.0 or newer, flash-attn and the rest, commands taken verbatim from the official requirements.txt), then weights download (the 1.3B package ships DiT weights only, while T5, VAE and the tokenizer are shared with 14B, so you must point assets_dir at a 14B directory or it will not start), then a first successful clip (torchrun or the official run_fast.sh), then parameter tuning (frame_num must be 4n+1, local_attn_size 18, sink_size 6, chunk_size, base_seed, save_dir), and finally production and deployment paths (the official team releases no deployment code, so reference the SGLang cookbook or NVIDIA flashdreams), closing with eight pitfalls and a ten-item launch checklist. Key pitfalls: the hardware bar has three conflicting versions (README 1.3B example uses 4 GPUs, run_fast.sh reference says 2, media claim consumer single-card real time), so trust the repo, treat 2 GPUs as the reproducible floor, and mark single-card real time unconfirmed; ulysses_size must divide the attention head count (12 for 1.3B, 40 for 14B) and equal nproc_per_node; choose between causal_fast (4 steps per chunk, no CFG) and causal_pretrain (40 steps per chunk, with CFG); and the CC BY-NC-SA 4.0 license is non-commercial, so confirm authorization before any productization.

Sep 14, 202611 min read