ivanleomk's picture
Update README.md
db02b9a verified
|
Raw History Blame Contribute Delete
7.66 kB
metadata
license: odc-by
language:
  - en
  - code
pretty_name: BigCode GPT-J SFT Curation Preview
size_categories:
  - n<1K
task_categories:
  - text-generation
tags:
  - code
  - python
  - sft
  - nextlat
  - dataset-curation
  - preview
configs:
  - config_name: candidates
    default: true
    data_files:
      - split: train
        path: candidate-train.jsonl
      - split: validation
        path: candidate-dev.jsonl
  - config_name: reviewed
    data_files:
      - split: preview
        path: reviewed-preview.jsonl
  - config_name: approved_preview
    data_files:
      - split: preview
        path: approved-preview.jsonl

BigCode GPT-J SFT curation preview

Inspection pilot, not a finished training dataset. The default viewer contains 100 static candidates (94 train / 6 development). Only three examples have received manual contract review and targeted execution checks. Two are in approved_preview; the rectangle example is held for ambiguity. All three passed their stated tests (17 assertions total); this is not comprehensive correctness certification.

Source and attribution

Derived from BigCode self-oss-instruct-sc2-exec-filter-50k, revision 356bb069eee815daa6e23e9a282eeefe1490ad44, made available under ODC-By. The pinned source has 50,661 rows. Preserve BigCode attribution and original source/license provenance on further redistribution. Source and benchmark file hashes are in manifest.json.

This preview inspects the first 500 rows, not a representative random sample. Static filters accepted 307; the first 100 are shown in the default viewer.

How examples were produced

No model generated new training solutions for this preview. Existing source rows were transformed deterministically:

  1. instruction supplies the task. Extract exactly one fenced Python block from response.
  2. Require exactly one undecorated standalone function. Reject imports, selected dynamic execution / file-I/O calls, multi-function snippets, and duplicate bodies.
  3. Keep the signature, insert the original instruction as its docstring, strip old solution docstrings and response explanations, and normalize the solution body using Python AST unparsing. Original responses are retained for audit.
  4. Screen exact normalized instruction/AST solution-body overlap against the pinned HumanEval reference. This does not rule out paraphrases or semantic contamination.
  5. Use GPT-J's pinned tokenizer and reject sequences exceeding 2,048 tokens including EOS.
  6. Group by source seed SHA1 for deterministic train/dev assignment. Near-duplicate families still require stronger screening before the split is frozen.
  7. For three selected examples, review the contract and run targeted assertions inside a disposable CPU sandbox. Never execute dataset code on the host.

The source seed is inspiration used by BigCode's generator, not our target answer. The source prompt is the generator's few-shot instruction template, not the prompt used for GPT-J training. Teacher explanations are omitted from code-only targets.

Viewer columns

  • source_id, source_row, source_revision, source_seed_sha1: traceability.
  • instruction, original_response: unmodified source content.
  • prompt, completion: transformed function-completion training pair.
  • token_count, body_sha256, split: length and grouping metadata.
  • validation_status: static candidate, targeted checks passed, or needs contract review.
  • validation_json (reviewed configs): exact review scope and targeted-check results.

Examples inspected

ID Task Status
165808 Retrieve a matrix value, handling invalid indexes 7 checks passed; negative indexes treated as invalid
81575 Extract dictionary id values in order 4 checks passed; assumes every dictionary has id
533341 Detect rectangle overlaps 6 checks passed for positive dimensions and strict overlap; held because touching-edge behavior is unspecified

Planned experiment

Both training arms will consume identical examples and token IDs. Prompt labels are masked with -100; code and EOS are supervised. Arm A uses ordinary next-token SFT. Arm B adds a NextLat-style future-state objective with detached latent targets. No training has run and no NextLat trainer is implemented in this preview.

HumanEval remains evaluation-only. Do not use its solutions or test feedback to create training targets or choose training hyperparameters.

Reproduction and limitations

build_preview.py and tokenize_preview.py perform local static processing. Download the pinned source parquet to source.parquet, install requirements.txt, and run them. validate_preview.py requires the CoreWeave SDK and a locally configured credential; it uses CPU-only remote execution with a three-minute cap. The preview was published as JSONL through the web editor.

Static candidates require execution checks, contract review, stronger overlap checks, and adequate development-set construction before training. The 94/6 candidate split is illustrative. Neither source execution filtering nor the targeted tests guarantee complete correctness.

The upload excludes credentials, virtual environments, model weights, the full upstream parquet, and the HumanEval benchmark file.

Readable example pairs

These transformed examples are displayed here because private dataset viewers may require a paid Hugging Face plan.

Source 165808 — reviewed_targeted_checks_passed

Prompt

def get_value(matrix, indices):
    'Write a Python function named `get_value` that takes a matrix (represented by a list of lists) and a tuple of indices, and returns the value at that index in the matrix. The function should handle index out of range errors by returning None.'

Completion

    row_index, col_index = indices
    if row_index < 0 or row_index >= len(matrix) or col_index < 0 or (col_index >= len(matrix[row_index])):
        return None
    return matrix[row_index][col_index]

Source 533341 — needs_contract_review

Prompt

def check_collision(rectangles):
    'Write a Python function `check_collision` that takes a list of `rectangles` as input and checks if there are any collisions between any two rectangles. A rectangle is represented as a tuple (x, y, w, h) where (x, y) is the top-left corner of the rectangle, `w` is the width, and `h` is the height.\n\nThe function should return True if any pair of rectangles collide, and False otherwise. Use an iterative approach and check for collisions based on the bounding box collision detection algorithm. If a collision is found, return True immediately without checking for more collisions.'

Completion

    for i in range(len(rectangles)):
        for j in range(i + 1, len(rectangles)):
            x1, y1, w1, h1 = rectangles[i]
            x2, y2, w2, h2 = rectangles[j]
            if x1 + w1 > x2 and x1 < x2 + w2 and (y1 + h1 > y2) and (y1 < y2 + h2):
                return True
    return False

Source 81575 — reviewed_targeted_checks_passed

Prompt

def extract_id_values(data: list) -> list:
    "Given a list of dictionaries, your goal is to traverse the list and create a new list with the value of the key `'id'` for each dictionary. For example, given `[{'id': 1, 'name': 'John'}, {'id': 2, 'name': 'Bob'}]`, the desired output would be `[1, 2]`. Make use of list comprehension and dictionary lookup to solve the problem in a single line of code."

Completion

    return [dictionary['id'] for dictionary in data]