Skip to content
Agentmart
Submit a tool

baichuan2

Route Baichuan2 chat inference, deployment/quantization, and fine-tuning workflows.

Skill by VectorSpaceLab

IndexedApache-2.0★ 341
Write a review

Chalk Labs

Need help deploying baichuan2?

Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.

Book a call

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/vectorspacelab-baichuan2

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Route Baichuan2 chat inference, deployment/quantization, and fine-tuning workflows.

Use cases: ml

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found
Runs as
Python package

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/baichuan2

What's inside

Skill name
baichuan2
Description
Route Baichuan2 chat inference, deployment/quantization, and fine-tuning workflows.
License
Apache-2.0
Metadata
disco-role: operating
Instructions
47 lines in SKILL.md · view on GitHub

Before installing

  • Ships executable scripts

Files (30)

  • SKILL.md
  • installation.md · references/
  • license-and-citation.md · references/
  • model-overview.md · references/
  • repo-provenance.md · references/
  • repo-routing-metadata.json · references/
  • troubleshooting.md · references/
  • check_baichuan2_env.py · scripts/
  • SKILL.md · sub-skills/deployment/
  • conversion.md · sub-skills/deployment/references/
  • cpu-deployment.md · sub-skills/deployment/references/
  • quantization.md · sub-skills/deployment/references/
  • troubleshooting.md · sub-skills/deployment/references/
  • normalize_lm_head.py · sub-skills/deployment/scripts/
  • quantize_model.py · sub-skills/deployment/scripts/
  • SKILL.md · sub-skills/fine-tuning/
  • data-format.md · sub-skills/fine-tuning/references/
  • deepspeed-config.md · sub-skills/fine-tuning/references/
  • installation.md · sub-skills/fine-tuning/references/
  • troubleshooting.md · sub-skills/fine-tuning/references/
  • workflows.md · sub-skills/fine-tuning/references/
  • train_supervised.py · sub-skills/fine-tuning/scripts/
  • validate_training_data.py · sub-skills/fine-tuning/scripts/
  • SKILL.md · sub-skills/inference/
  • api-reference.md · sub-skills/inference/references/
  • troubleshooting.md · sub-skills/inference/references/
  • workflows.md · sub-skills/inference/references/
  • chat_cli.py · sub-skills/inference/scripts/
  • chat_web_demo.py · sub-skills/inference/scripts/
  • run_openai_api.py · sub-skills/inference/scripts/

SKILL.md (first lines)

# Baichuan2

Use this repo skill when a task is about Baichuan2 model selection, chat/base inference, local chat demos, OpenAI-compatible serving, quantized deployment, CPU deployment, checkpoint conversion, or supervised fine-tuning.

Baichuan2 is a model-family repository rather than an importable Python package. The operating guidance is therefore organized around public workflows and bundled helpers, not a package module tree.

## Start here

1. If the task may depend on repo freshness, read [`references/repo-provenance.md`](references/repo-provenance.md).
2. If the user has not chosen a checkpoint, read [`references/model-overview.md`](references/model-overview.md).
3. Prepare the smallest environment for the requested workflow using [`references/installation.md`](references/installation.md).
4. Run a no-weight dependency check before loading 7B/13B weights:

```bash
python scripts/check_baichuan2_env.py --workflow inference
python scripts/check_baichuan2_env.py --workflow all --require-cuda
```

Use `--workflow inference`, `deployment`, `fine-tuning`, or `all` to match the route. These checks do not download model weights.

## Route by user request

| User request signals | Read | Why |
| --- | --- | --- |
| `model.chat`, Python inference, Base-model generation, terminal demo, Streamlit web UI, OpenAI-compatible `/v1/chat/completions` | [`sub-skills/inference/SKILL.md`](sub-skills/inference/SKILL.md) | Owns Baichuan2 Chat/Base inference, CLI/web demos, and the Flask chat-completions helper. |
| 4-bit/8-bit quantization, BitsAndBytes, CPU-only loading, `load_in_8bit`, `quantize(4)`, `lm_head.weight`, Baichuan1 optimization migration | [`sub-skills/deployment/SKILL.md`](sub-skills/deployment/SKILL.md) | Owns memory-reduction, CPU deployment, and checkpoint-conversion workflows. |
| supervised fine-tuning, DeepSpeed, LoRA, `fine-tune.py`, hostfile, `W_pack`, `ds_config`, training data schema | [`sub-skills/fine-tuning/SKILL.md`](sub-skills/fine-tuning/SKILL.md) | Owns SFT data validation, ZeRO-3 launch planning, LoRA, and post-training loading. |
| installation/import/backend failure before a route is clear | [`references/troubleshooting.md`](references/troubleshooting.md) | Covers shared CUDA, dependency, model-access, and optional-extra problems. |
| license, commercial-use constraints, or citation | [`references/license-and-citation.md`](references/license-and-citation.md) | Distills the repo's license/citation section. |

## Core operating facts

- Released model ids include `baichuan-inc/Baichuan2-7B-Base`, `baichuan-inc/Baichuan2-7B-Chat`, `baichuan-inc/Baichuan2-13B-Base`, `baichuan-inc/Baichuan2-13B-Chat`, and published 4-bit Chat variants.
- Chat checkpoints expose `model.chat(tokenizer, messages)` through Hugging Face `trust_remote_code=True`. Base checkpoints use `model.generate(...)` instead.
- The repository demos are GPU-oriented by default. CPU loading is a separate float32 deployment branch and is expected to be slow.
- Quantization and training are CUDA-sensitive. Do not use a CPU import check as proof that those workflows work.
- The bundled scripts intentionally include `--help`, `--dry-run`, or validation modes so future agents can inspect plans without downloading large weights.

## Do not do this

- Do not tell the user to open or run original checkout scripts; use the bundled helpers and references in this skill.
- Do not force Base checkpoints through Chat-only CLI/web/API wrappers.
- Do not add `device_map="auto"` to online quantization; the deployment sub-skill explains why.
- Do not launch DeepSpeed training until the data validator and dry-run plan pass.
- Do not import this skill into live repo-skill storage unless a later verification/import workflow is explicitly approved. This construction run was requested as **not import**.

From VectorSpaceLab/AREX-Skill, Apache-2.0.

More from VectorSpaceLab/AREX-Skill

Signals

Stars
341
Forks
26
Open issues
0
Last commit (this folder)
Aug 26, 2026 (2 months ago)
Last release
Sep 2, 2026 (2 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
Apache-2.0
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from VectorSpaceLab

Done for you

Rather not set it up yourself?

Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.

See how we build AI agents →Read the case studies

Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.

launches shipped
50+
launches shipped
media placements
500+
media placements
founders on every account
2
founders on every account

Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block

Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.

Get baichuan2 running in your business

Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.

Goes to the Chalk Labs founders, not the newsletter. Privacy

Need help deploying baichuan2?

CallGet help
Cite this page

baichuan2 skill. Agent Mart. https://agentmart.dev/skills/vectorspacelab-baichuan2 (last updated 2026-10-24)