Skip to content
Back to skills

Architecture And Loading

ASecurity

"Operate Baichuan-7B architecture, local source loading, tiny

  • 247 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 8, 2026
developmentpythonrustbashgitapibackend

Works with

  • api

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned September 8, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill architecture-and-loading --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Architecture And Loading?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Architecture And Loading
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-architecture-and-loading/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-architecture-and-loading)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: architecture-and-loading
description: "Operate Baichuan-7B architecture, local source loading, tiny
  synthetic forward checks, Hugging Face inference loading, and generation/cache
  preparation."
disable-model-invocation: true
metadata:
  disco-role: operating
license: Apache 2.0
---

# 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

- Loading Baichuan-7B or compatible local weights with Hugging Face `AutoTokenizer` / `AutoModelForCausalLM` and `trust_remote_code=True`.
- Inspecting the local classes `BaiChuanConfig`, `Model`, `Attention`, `DecoderLayer`, and `BaiChuanForCausalLM`.
- Running a safe config-only smoke that needs no official 7B weights, no datasets, and no network.
- Explaining generation preparation: `past_key_values`, `attention_mask`, `position_ids`, `use_cache`, and newer Transformers generation warnings.
- Diagnosing invalid `hidden_size` / `num_attention_heads` combinations or direct attention-mask shape errors.

## Do not route here for

- C-Eval/MMLU benchmark data, scoring commands, or result files: use sibling `evaluation-workflows`.
- DeepSpeed pretraining, corpus shards, tokenizer placement for training, hostfiles, or cluster launch commands: use sibling `pretraining-and-deepspeed`.
- General package installation decisions that affect multiple workflows: start at the parent root skill and shared troubleshooting.

## Operating map

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

## Minimal safe smoke

```bash
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.

Files in this skill

  • SKILL.md2.7 KB
  • references/troubleshooting.md6.4 KB
  • references/workflows.md10 KB
  • scripts/local_model_smoke.py10.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.