|
Download inference/README.md from FlyaiLab/FlyAI-Decision-27B: direct link, hf CLI and curl.
- Browser
- Download file 9.55 kB
-
https://huggingface.co/FlyaiLab/FlyAI-Decision-27B/resolve/main/inference/README.md
- Command line
-
hf download hf://FlyaiLab/FlyAI-Decision-27B/inference/README.md
-
curl -L -o README.md https://huggingface.co/FlyaiLab/FlyAI-Decision-27B/resolve/main/inference/README.md
9.55 kB
| # FlyAI-Decision-27B reproduction bundle | |
| This is the inference bundle for [FlyAI-Decision-27B](https://huggingface.co/FlyaiLab/FlyAI-Decision-27B). | |
| Its 16 full-attention layers use upstream vLLM with `text_config.is_causal=False`; | |
| 48 Gated DeltaNet layers retain their original causal behavior. No custom | |
| attention kernel, model subclass or patched vLLM installation is required. | |
| ## Host requirements and validation boundary | |
| - Linux x86_64, glibc >= 2.31, native NVIDIA R580 or newer driver for CUDA 13.0. | |
| - One visible GPU with sufficient free memory. The full public run used an L20Z | |
| with 79.18 GiB total memory; the checkpoint is approximately 55 GB and runtime | |
| allocations need additional memory. The official target is an RTX PRO 6000 96 GB. | |
| - A host C++ compiler accepted by CUDA 13.0, with development headers (`g++` on | |
| Debian/Ubuntu), and writable temporary/cache directories. `CXX`, if set, must | |
| name a compiler executable. Installation compiles a small CUDA kernel to | |
| detect incompatible compiler/header combinations before loading the model. | |
| - `uv 0.11.6`; Python 3.12.12 and CUDA compiler/runtime wheels are selected by the | |
| bundle. An existing system CUDA toolkit is not required. | |
| - Network access for the first package/Python download, and sufficient disk and | |
| host RAM for weights, package caches and model loading. First-use kernel | |
| compilation can take longer than subsequent starts. | |
| The completed evaluation used driver **580.105.08**, glibc **2.32**, CPython | |
| **3.12.12** and an **L20Z**. This is the tested configuration, not an RTX PRO 6000 | |
| certification. The uv lock does not install or pin the host driver, glibc or C++ | |
| compiler. See [NVIDIA CUDA compatibility](https://docs.nvidia.com/deploy/cuda-compatibility/latest/minor-version-compatibility.html). | |
| ## Download and install | |
| Download the complete model repository at the immutable **reproduction bundle** | |
| revision linked in [submission PR #513](https://github.com/apolinario/decision-index/pull/513). | |
| Use that revision for both weights and inference files. The results manifest | |
| retains the original evaluated revision for provenance. This maintenance update | |
| keeps weights, engine code, prompts, codebook and `uv.lock` unchanged. | |
| Install [uv 0.11.6](https://github.com/astral-sh/uv/releases/tag/0.11.6) and make | |
| `uv` available on `PATH`. From the downloaded model repository root: | |
| ```bash | |
| export CUDA_VISIBLE_DEVICES=0 | |
| bash inference/install.sh | |
| ``` | |
| All launch scripts default to GPU 0 only when `CUDA_VISIBLE_DEVICES` is unset. | |
| An explicit value (including a GPU UUID or an empty value) is preserved; exactly | |
| one GPU must be visible. Choose the GPU allocated to your job on a shared host. | |
| Installation runs a GPU check and therefore needs access to that GPU too. | |
| The installer runs `uv sync --frozen --managed-python` and dependency/source | |
| checks. `.python-version` selects CPython 3.12.12; `uv.lock` pins vLLM 0.31.0, | |
| PyTorch 2.13.0 / CUDA 13.0, Transformers 5.17.0 and Tokenizers 0.23.3. | |
| The official vLLM wheel is used. `runtime_env.sh` selects the locked nvcc, | |
| headers, CRT, NVVM, CCCL and nvJitLink for upstream JIT paths. Each launch script | |
| loads it again; environment exports from the installation subprocess do not | |
| persist in the caller shell. | |
| Installation checks BF16 execution and compilation of a tiny CUDA kernel. The | |
| model-level smoke run below is still required to test actual vLLM kernels on a | |
| new GPU. A successful install alone does not certify inference or latency. | |
| ## Maintainer-supplied requests | |
| From the model repository root, use official-format rows and a fresh output: | |
| ```bash | |
| CUDA_VISIBLE_DEVICES=0 bash inference/run_rows.sh "$PWD" /path/to/rows.jsonl /path/to/output | |
| ``` | |
| The wrapper initializes CUDA tools and invokes the unmodified official runner | |
| with `decision_vllm_engine:DecisionVllmEngine`, the bundled codebook, | |
| `max_model_len=32768`, `max_num_seqs=64`, `--edition 0.3` and `--compact`. | |
| It also works with gzip-compressed JSONL. Paths are relative to the caller and | |
| may contain spaces. A directory containing `results.jsonl` is rejected. | |
| This path evaluates exactly the supplied rows. It does not validate that they | |
| constitute the full public suite and does not produce aggregate scores. Keep | |
| private evaluation rows local and let the maintainer's scorer score them. | |
| The official Python interface is `Engine(state, questions) -> (response, raw)`; | |
| no hosted service is required. Gold labels and benchmark identifiers are never | |
| passed to the engine. | |
| ## Public suite: smoke test and full reproduction | |
| Use a locally rebuilt and imported official **0.3** suite. Its preparation is | |
| shown below. From the model repository root, set absolute paths: | |
| ```bash | |
| MODEL_DIR="$PWD" | |
| SUITE_DIR=/absolute/path/to/suite-0.3 | |
| cd "$MODEL_DIR/inference" | |
| uv run --frozen --managed-python python -m decision_index suite verify \ | |
| --edition 0.3 --dir "$SUITE_DIR" | |
| uv run --frozen --managed-python python -m decision_index suite sample \ | |
| --edition 0.3 --dir "$SUITE_DIR" --n 8 --out /absolute/path/to/smoke-rows.jsonl.gz | |
| CUDA_VISIBLE_DEVICES=0 bash run_rows.sh "$MODEL_DIR" \ | |
| /absolute/path/to/smoke-rows.jsonl.gz /absolute/path/to/smoke-output | |
| ``` | |
| The smoke run loads the full model, exercises the selected GPU's kernels and | |
| runs generic warm-up checks. It is not a full-suite or latency certification. | |
| Then run the complete public evaluation into a different fresh directory: | |
| ```bash | |
| CUDA_VISIBLE_DEVICES=0 bash run_suite.sh "$MODEL_DIR" "$SUITE_DIR" /absolute/path/to/full-output | |
| ``` | |
| `run_suite.sh` uses the official `pipeline --suite-dir ... --edition 0.3` path, | |
| which verifies frozen suite hashes, applies the official edition filtering, | |
| runs inference and writes `scores.json`, `index.json` and `benchmark-summary.json`. | |
| Do not substitute a single raw suite file for the full imported suite. The suite | |
| may include excluded rows; compare scored coverage and `complete`, not just raw | |
| line counts. The reference run has 140,178 scored requests and Public Index 65.74. | |
| Numerical values and latency may change on different hardware. | |
| ### Rebuild inputs if you do not already have the suite | |
| Benchmark inputs are not redistributed. Accept the original sources' terms | |
| (including HLE) and log in to Hugging Face as required. Use the vendored kit at | |
| commit `25c6ec7b6b5f44a216c63c3a700de3a9c6d6699d`; its full | |
| [instructions](official/README.md#quickstart-local) describe data access. | |
| Keep rebuilding dependencies in a separate environment so that the inference | |
| lock remains intact. From `inference/`: | |
| ```bash | |
| uv venv --python 3.12.12 --managed-python .suite-build | |
| uv pip install --python .suite-build/bin/python './official[rebuild]' | |
| HF_HUB_DISABLE_XET=1 .suite-build/bin/python -m decision_index suite rebuild \ | |
| --edition 0.3 --work /absolute/path/to/suite-work | |
| .suite-build/bin/python -m decision_index suite import --edition 0.3 \ | |
| --dir /absolute/path/to/suite-0.3 \ | |
| --rows /absolute/path/to/suite-work/artifacts/benchmark-suite/release-v2-rebuilt/selected-rows.jsonl.gz \ | |
| --added-rows /absolute/path/to/suite-work/artifacts/benchmark-suite/release-v2-rebuilt/added-rows.jsonl.gz \ | |
| --gsm8k-rows /absolute/path/to/suite-work/artifacts/benchmark-suite/release-v3-rebuilt/gsm8k-rows.jsonl.gz | |
| ``` | |
| The build environment is separate from the frozen inference environment. Source | |
| availability may change. Import/verification must succeed without `--no-verify`; | |
| a hash mismatch is not permission to evaluate a different suite as the reference. | |
| ## Inference protocol | |
| - BF16, one visible GPU and tensor parallel size 1. | |
| - The original native prompt, option ordering, 255-code vocabulary and token IDs. | |
| - Full, independent prompts; prefix caching and chunked prefill are disabled. | |
| - Context capacity 32,768 tokens; inputs are rejected rather than truncated. | |
| - At most 255 candidates per field, with complete candidate probabilities. | |
| - One-token readout and FP32 softmax over the candidate logits. | |
| - Eager execution with synchronous scheduling; the official runner measures | |
| sequential request wall time after generic warm-up. | |
| - The upstream attention backend is selected by vLLM for the actual GPU. | |
| The loaded model is inspected to verify 16 upstream bidirectional full-attention | |
| layers and 48 upstream Gated DeltaNet layers. The engine checks 255-option | |
| coverage, boolean responses and refusal above the option limit during warm-up. | |
| Batch isolation compares 64 distinct prompts individually against mixed and | |
| reverse-order batches, varying lengths, candidate orders and question types. | |
| Probability differences and changed decisions are recorded without blocking | |
| evaluation. Keep `software-environment.json`, | |
| `attention-config-check.json`, `engine-self-check.json`, `environment.json`, | |
| `engine-final.json`, `status.json` and `results.jsonl` as evaluation receipts. | |
| Reference-input consistency and latency results accompany the validated | |
| release separately. Hardware changes can cause numerical differences. | |
| ## Offline installations | |
| Prepopulate the uv package cache and managed Python installation and transport | |
| them to the target host. Set `UV_OFFLINE=1`, `UV_CACHE_DIR` and | |
| `UV_PYTHON_INSTALL_DIR` to the transported locations. This covers uv downloads; | |
| GPU-specific JIT code may require additional cached artifacts. Run the smoke | |
| check on the target hardware before relying on a fully offline environment. | |
| The code license is in `LICENSE`; model terms and attribution are in the root | |
| model card. Evaluation receipts are in | |
| [FlyAI-Decision-27B-results](https://huggingface.co/datasets/FlyaiLab/FlyAI-Decision-27B-results). | |