Architecture and loading

From VectorSpaceLab/AREX-Skill · View interactive version

Architecture and loading is an AI agent skill from the GitHub repository VectorSpaceLab/AREX-Skill. Operate Baichuan-7B architecture, local source loading, tiny synthetic forward checks, Hugging Face inference loading, and generation/cache preparation.

How to use this skill

Skill file

Architecture and Loading

Use this sub-skill when the user asks to load or inspect Baichuan-7B model code, reason about BaiChuanConfig defaults, construct BaiChuanForCausalLM, run a tiny local forward smoke, understand generate()/cache preparation, or debug attention/head shape constraints.

Route here for

Do not route here for

Operating map

  1. For a quick answer, read workflows first.
  2. For local source verification, run scripts/local_model_smoke.py with --repo-root /path/to/Baichuan-7B.
  3. For known failures, read local troubleshooting, then escalate cross-cutting install/backend issues to shared troubleshooting.
  4. For broader API placement, use the parent Baichuan-7B repo skill and shared API reference.

Minimal safe smoke

python sub-skills/architecture-and-loading/scripts/local_model_smoke.py --repo-root /path/to/Baichuan-7B

Expected coverage: local source import, tiny BaiChuanConfig, eval-mode BaiChuanForCausalLM forward, logits shape (1, 4, 32), finite causal-LM loss, cache-aware prepare_inputs_for_generation, invalid head-divisibility failure, and has_generate reporting.

Add --cuda only when the user explicitly wants a CUDA availability/allocation check; it does not download or run the real 7B model.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.