---
title: Ling-Tiny-SFT
canonical_url: "https://www.modelscope.cn/datasets/AsystemAReno/Ling-Tiny-SFT"
md_url: "https://www.modelscope.cn/datasets/AsystemAReno/Ling-Tiny-SFT.md"
repository: AsystemAReno/Ling-Tiny-SFT
chinese_name: "Ling Tiny支付场景SFT微调数据"
last_updated: 2026-10-18
license: "Apache License 2.0"
storage_size: "9.3 MB"
downloads: 10
stars: 0
---

# Ling-Tiny-SFT

> Ling-Tiny-SFT - AsystemAReno 在 ModelScope 开源的数据集。An SFT dataset for structured output in composite payment workflows.

AsystemAReno/Ling-Tiny-SFT 是 ModelScope 魔搭社区上的数据集，存储大小 9.3 MB，采用 Apache License 2.0 许可。

- **Repository**: AsystemAReno/Ling-Tiny-SFT
- **License**: Apache License 2.0
- **Storage size**: 9.3 MB
- **Downloads**: 10
- **Stars**: 0
- **Last updated**: 2026-10-18

Source: https://www.modelscope.cn/datasets/AsystemAReno/Ling-Tiny-SFT

---

# Ling-Tiny-SFT

**An SFT dataset for structured output in composite payment workflows.**

Ling-Tiny-SFT turns orders, payment channel balances, and promotion rules into payment-request-to-JSON examples for Ling Tiny model fine-tuning. The model must calculate the payment plan for the selected channel and recommend the feasible channel offering the largest discount, while handling split payments, exclusive promotions, rounding, and error conditions.

Prepared for the AReno Ling Tiny end-to-end fine-tuning recipe, the dataset contains **1,400 training examples** and **100 validation examples**. Requests are generated programmatically, and answers are computed by a reference payment service. Please note the dataset contains no real transaction records, all training targets are direct JSON outputs without `<think>` tags or reasoning text.

## Dataset Size and Scenario Distribution

| Split | File | Examples | Purpose |
| --- | --- | ---: | --- |
| train | `train.jsonl` | 1,400 | SFT parameter updates |
| validation | `valid.jsonl` | 100 | Configuration or checkpoint selection during development |
| Total | — | **1,500** | — |

**This version does not include a test split.** The validation set does not replace an independent final evaluation set.

| Scenario | Original Label | train | validation |
| --- | --- | ---: | ---: |
| Split payment | `SPLIT_PAYMENT` | 357 | 25 |
| Recommended channel switch | `RECOMMEND_SWITCH` | 264 | 19 |
| Exclusive vs. stackable promotions | `EXCLUSIVE_VS_STACK` | 213 | 15 |
| Rounding boundary | `ROUND_HALF_UP_BOUNDARY` | 203 | 15 |
| Single-channel payment | `SINGLE_CHANNEL_NORMAL` | 148 | 11 |
| Recommendation tie | `TIE_BREAKER` | 140 | 10 |
| Insufficient funds | `INSUFFICIENT_FUNDS` | 45 | 3 |
| Selected channel not found | `CHANNEL_NOT_FOUND` | 30 | 2 |

Scenario labels reflect the original generator's sampling intent. They are not independently revalidated classifications of the boundary conditions in each example.

## Repository Structure

```text
Ling-Tiny-SFT/
├── README.md             # Dataset overview, fields, and loading instructions
├── train.jsonl           # 1,400 training examples
├── valid.jsonl           # 100 examples mapped to the validation split
├── system_prompt.txt     # Shared payment rules, already included in each prompt
└── manifest.json         # Provenance, preparation rules, statistics, and checksums
```

## Data Format

Each line in a JSONL file contains one example:

| Field | Type | Description |
| --- | --- | --- |
| `case_id` | string | Original example identifier |
| `source_line` | integer | One-based line number in the source file |
| `bucket` | string | Original scenario label |
| `request_fingerprint` | string | Request SHA-256 excluding the order ID |
| `input` | object | Order, channels, promotions, and selected channel |
| `ground_truth` | object | Expected result from the reference payment service |
| `prompt` | string | Complete rules and compact request JSON, used as model input |
| `response` | string | Expected result serialized as JSON, used as the supervised target |

### Example from the Training Set

The following JSON content shows `case_id`, the complete `input`, and `ground_truth` for training example `SFT_001262`; other fields are omitted for readability. The order amount is 7 cents. The selected channel receives a 1-cent general discount and a 1-cent channel discount, resulting in a 5-cent deduction. The same channel is also recommended.

```json
{
  "case_id": "SFT_001262",
  "input": {
    "available_channels": [
      {
        "balance": 7,
        "channel_id": "GIFT_VOUCHER_CARD_9414"
      },
      {
        "balance": 21,
        "channel_id": "BANK_CMB_GOLD_6278"
      },
      {
        "balance": 29553,
        "channel_id": "BANK_ICBC_DEBIT_7379"
      },
      {
        "balance": 9,
        "channel_id": "BANK_SPDB_CARD_9218"
      }
    ],
    "order": {
      "order_amount": 7,
      "order_id": "ORD_0011261"
    },
    "promotions": [
      {
        "applicable_channel_id": null,
        "discount_amount": 1,
        "discount_percent": 0,
        "is_exclusive": false,
        "promotion_id": "PROMO_FIXED_1",
        "promotion_type": "FIXED_DISCOUNT",
        "threshold": 3
      },
      {
        "applicable_channel_id": "BANK_CMB_GOLD_6278",
        "discount_amount": 1,
        "discount_percent": 0,
        "is_exclusive": false,
        "promotion_id": "PROMO_CH_2",
        "promotion_type": "CHANNEL_DISCOUNT",
        "threshold": 2
      }
    ],
    "selected_channel_id": "BANK_CMB_GOLD_6278"
  },
  "ground_truth": {
    "cashier_receipt": {
      "applied_promotions": [
        "PROMO_FIXED_1",
        "PROMO_CH_2"
      ],
      "payable_amount": 5,
      "primary_channel_id": "BANK_CMB_GOLD_6278",
      "primary_deduct_amount": 5,
      "secondary_channel_id": null,
      "secondary_deduct_amount": 0,
      "total_discount_amount": 2
    },
    "error_message": null,
    "order_amount": 7,
    "order_id": "ORD_0011261",
    "recommended_option": {
      "applied_promotions": [
        "PROMO_FIXED_1",
        "PROMO_CH_2"
      ],
      "payable_amount": 5,
      "primary_deduct_amount": 5,
      "recommended_channel_id": "BANK_CMB_GOLD_6278",
      "secondary_channel_id": null,
      "secondary_deduct_amount": 0,
      "total_discount_amount": 2
    },
    "status": "SUCCESS"
  }
}
```

Just use `prompt` and `response` for training. For inference, pass only `prompt`: do not append the rules again or include `response` or `ground_truth` in the input.

## Quick Start

The release is intended to provide identical files through two dataset hubs:

- **Hugging Face:** the mirror repository ID is pending. Replace `AsystemAReno/Ling-Tiny-SFT` in the examples below with the published ID.
- **[ModelScope](https://modelscope.cn/datasets/AsystemAReno/Ling-Tiny-SFT)** (`AsystemAReno/Ling-Tiny-SFT`): the repository has been created; the prepared data files are awaiting upload.

After publication, either option below provides both `train.jsonl` and `valid.jsonl`. No additional assets from the other platform are required.

### Option 1: HuggingFace

First install the huggingface dependencies, then download the dataset repository:

```bash
pip install datasets huggingface_hub

hf download AsystemAReno/Ling-Tiny-SFT \
  --repo-type dataset \
  --local-dir Ling-Tiny-SFT
```

To load the splits directly in Python instead:

```python
from datasets import load_dataset

dataset = load_dataset("AsystemAReno/Ling-Tiny-SFT")
train = dataset["train"]             # 1,400 examples
validation = dataset["validation"]   # 100 examples

print(train[0])
```

The CLI command creates the local directory used in the Usage example below. The Python alternative returns the splits directly and uses the library's cache.

### Option 2: ModelScope

Install the ModelScope SDK and download the complete dataset repository:

```bash
pip install modelscope

modelscope download --dataset AsystemAReno/Ling-Tiny-SFT \
  --local-dir Ling-Tiny-SFT
```

Alternatively, clone the repository with Git LFS installed:

```bash
git lfs install
git clone https://modelscope.cn/datasets/AsystemAReno/Ling-Tiny-SFT.git
```

### Usage

After downloading or cloning the repository, run this example from its parent directory to read both JSONL files and inspect a training example:

```python
import json
from pathlib import Path

data_dir = Path("Ling-Tiny-SFT")

with (data_dir / "train.jsonl").open(encoding="utf-8") as stream:
    train = [json.loads(line) for line in stream if line.strip()]

with (data_dir / "valid.jsonl").open(encoding="utf-8") as stream:
    validation = [json.loads(line) for line in stream if line.strip()]

print(f"Training examples: {len(train)}")
print(f"Validation examples: {len(validation)}")

sample = train[0]
print("Case ID:", sample["case_id"])
print("Scenario:", sample["bucket"])
print("Model input:", sample["prompt"])
print("Training target:", sample["response"])
print("Expected result:")
print(json.dumps(sample["ground_truth"], indent=2, ensure_ascii=False))
```

Use `prompt` as the model input and `response` as the SFT target. For validation, generate a response from `prompt` and compare the parsed result with `ground_truth`. This release has no test split; use a separate evaluation set for final reporting.

For reproducible experiments, pin the published revision using `--revision` in the download commands or `revision=` in `load_dataset`. Remote downloads remain unverified until publication; local JSON loading has been verified.

## Applications

- **Domain SFT:** train small models to produce business JSON according to explicit payment rules.
- **Structured output:** examine field completeness, numeric types, and success or error responses.
- **Rule execution analysis:** analyze errors in arithmetic, promotion selection, two-channel deductions, and recommendations.
- **Reproducible experiments:** train on fixed dataset versions and compare results before and after fine-tuning using an independent evaluation set.

## AReno based Recipe

This dataset is intended for end-to-end Ling Tiny SFT experiments with AReno. After loading the data, the planned workflow covers baseline evaluation, fine-tuning, adapter saving, reloading in a separate process, and evaluation after fine-tuning. Mac, Colab, and Kaggle use the same fixed data; training compatibility must still be verified separately on each platform.

Target-tokenizer length budgets, chat templates, and thinking-mode settings have not yet been validated. This release makes no claims about model performance or successful training across platforms. Changes to prompts, examples, or splits should produce a new dataset version, rather than silent filtering in the Notebook.
