Datasets:
The dataset viewer is not available for this split.
Error code: StreamingRowsError
Exception: CastError
Message: Couldn't cast
record_id: string
source: string
language: string
chatml: string
domain: string
license: string
license_tier: string
code_blocks: list<item: struct<language: string, code: string>>
child 0, item: struct<language: string, code: string>
child 0, language: string
child 1, code: string
provenance: struct<source_uri: string>
child 0, source_uri: string
license_tiers: struct<tier_a: int64, tier_b: int64>
child 0, tier_a: int64
child 1, tier_b: int64
sources: struct<aya: int64, cybernative: int64, opencoder_stage2: int64, xrfm_security_kb: int64>
child 0, aya: int64
child 1, cybernative: int64
child 2, opencoder_stage2: int64
child 3, xrfm_security_kb: int64
languages: struct<arb: int64, en: int64, spa: int64, urd: int64>
child 0, arb: int64
child 1, en: int64
child 2, spa: int64
child 3, urd: int64
duplicates: struct<duplicates_by_source: struct<aya: int64, cybernative: int64, opencoder_stage2: int64, xrfm_se (... 363 chars omitted)
child 0, duplicates_by_source: struct<aya: int64, cybernative: int64, opencoder_stage2: int64, xrfm_security_kb: int64>
child 0, aya: int64
child 1, cybernative: int64
child 2, opencoder_stage2: int64
child 3, xrfm_security_kb: int64
child 1, exact_chatml: int64
child 2, exact_duplicate_rows: int64
child 3, most_repeated_prompt: string
child 4, most_repeated_prompt_count: int64
child 5, top_assistant_responses: list<item: struct<count: int64, response: string>>
child 0, item:
...
blocks_with_placeholder_comment: int64
child 3, blocks_with_x_plus_y: int64
child 4, code_block_languages: struct<python: int64>
child 0, python: int64
child 5, python_blocks_checked: int64
child 6, python_syntax_errors: int64
child 7, rows_with_code_blocks: int64
rows: int64
sources_with_multiple_licenses: list<item: null>
child 0, item: null
license_by_source: struct<aya: struct<Apache-2.0: int64>, cybernative: struct<Apache-2.0: int64>, opencoder_stage2: str (... 58 chars omitted)
child 0, aya: struct<Apache-2.0: int64>
child 0, Apache-2.0: int64
child 1, cybernative: struct<Apache-2.0: int64>
child 0, Apache-2.0: int64
child 2, opencoder_stage2: struct<MIT: int64>
child 0, MIT: int64
child 3, xrfm_security_kb: struct<CC0-1.0: int64>
child 0, CC0-1.0: int64
licenses: struct<Apache-2.0: int64, CC0-1.0: int64, MIT: int64>
child 0, Apache-2.0: int64
child 1, CC0-1.0: int64
child 2, MIT: int64
provenance_missing: int64
domains: struct<code: int64, defensive_security: int64, multilingual_qa: int64, rag_citation: int64>
child 0, code: int64
child 1, defensive_security: int64
child 2, multilingual_qa: int64
child 3, rag_citation: int64
pii_secrets: struct<aws_access_key: int64, bearer_token: int64, email: int64, hf_token_like: int64, private_key: (... 6 chars omitted)
child 0, aws_access_key: int64
child 1, bearer_token: int64
child 2, email: int64
child 3, hf_token_like: int64
child 4, private_key: int64
to
{'chatml': {'canonical_markers': Value('int64'), 'corrupt_marker_rows': Value('int64'), 'corrupt_markers': Value('int64'), 'empty_assistant_response': Value('int64'), 'expected_3_role_structure': Value('int64')}, 'code': {'blocks': Value('int64'), 'blocks_with_generic_func_id': Value('int64'), 'blocks_with_placeholder_comment': Value('int64'), 'blocks_with_x_plus_y': Value('int64'), 'code_block_languages': {'python': Value('int64')}, 'python_blocks_checked': Value('int64'), 'python_syntax_errors': Value('int64'), 'rows_with_code_blocks': Value('int64')}, 'domains': {'code': Value('int64'), 'defensive_security': Value('int64'), 'multilingual_qa': Value('int64'), 'rag_citation': Value('int64')}, 'duplicates': {'duplicates_by_source': {'aya': Value('int64'), 'cybernative': Value('int64'), 'opencoder_stage2': Value('int64'), 'xrfm_security_kb': Value('int64')}, 'exact_chatml': Value('int64'), 'exact_duplicate_rows': Value('int64'), 'most_repeated_prompt': Value('string'), 'most_repeated_prompt_count': Value('int64'), 'top_assistant_responses': List({'count': Value('int64'), 'response': Value('string')}), 'top_user_prompts': List({'count': Value('int64'), 'prompt': Value('string')}), 'unique_assistant_responses': Value('int64'), 'unique_chatml': Value('int64'), 'unique_user_prompts': Value('int64')}, 'languages': {'arb': Value('int64'), 'en': Value('int64'), 'spa': Value('int64'), 'urd': Value('int64')}, 'license_by_source': {'aya': {'Apache-2.0': Value('int64')}, 'cybernative': {'Apache-2.0': Value('int64')}, 'opencoder_stage2': {'MIT': Value('int64')}, 'xrfm_security_kb': {'CC0-1.0': Value('int64')}}, 'license_tiers': {'tier_a': Value('int64'), 'tier_b': Value('int64')}, 'licenses': {'Apache-2.0': Value('int64'), 'CC0-1.0': Value('int64'), 'MIT': Value('int64')}, 'pii_secrets': {'aws_access_key': Value('int64'), 'bearer_token': Value('int64'), 'email': Value('int64'), 'hf_token_like': Value('int64'), 'private_key': Value('int64')}, 'provenance_missing': Value('int64'), 'rows': Value('int64'), 'sources': {'aya': Value('int64'), 'cybernative': Value('int64'), 'opencoder_stage2': Value('int64'), 'xrfm_security_kb': Value('int64')}, 'sources_with_multiple_licenses': List(Value('null'))}
because column names don't match
Traceback: Traceback (most recent call last):
File "/src/services/worker/src/worker/utils.py", line 149, in get_rows_or_raise
return get_rows(
dataset=dataset,
...<4 lines>...
column_names=column_names,
)
File "/src/libs/libcommon/src/libcommon/utils.py", line 272, in decorator
return func(*args, **kwargs)
File "/src/services/worker/src/worker/utils.py", line 129, in get_rows
rows_plus_one = list(itertools.islice(safe_iter(ds, dataset=dataset), rows_max_number + 1))
File "/src/services/worker/src/worker/utils.py", line 544, in safe_iter
yield from ds.decode(False) if ds.features else ds
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 3052, in __iter__
for key, example in ex_iterable:
^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2559, in __iter__
for key, pa_table in self._iter_arrow():
~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 2584, in _iter_arrow
for key, pa_table in self.ex_iterable._iter_arrow():
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 558, in _iter_arrow
for key, pa_table in iterator:
^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/iterable_dataset.py", line 440, in _iter_arrow
for key, pa_table in self.generate_tables_fn(**gen_kwags):
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 361, in _generate_tables
self._cast_table(pa_table, json_field_paths=json_field_paths),
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.14/site-packages/datasets/packaged_modules/json/json.py", line 132, in _cast_table
pa_table = table_cast(pa_table, self.info.features.arrow_schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2381, in table_cast
return cast_table_to_schema(table, schema)
File "/usr/local/lib/python3.14/site-packages/datasets/table.py", line 2309, in cast_table_to_schema
raise CastError(
...<3 lines>...
)
datasets.table.CastError: Couldn't cast
record_id: string
source: string
language: string
chatml: string
domain: string
license: string
license_tier: string
code_blocks: list<item: struct<language: string, code: string>>
child 0, item: struct<language: string, code: string>
child 0, language: string
child 1, code: string
provenance: struct<source_uri: string>
child 0, source_uri: string
license_tiers: struct<tier_a: int64, tier_b: int64>
child 0, tier_a: int64
child 1, tier_b: int64
sources: struct<aya: int64, cybernative: int64, opencoder_stage2: int64, xrfm_security_kb: int64>
child 0, aya: int64
child 1, cybernative: int64
child 2, opencoder_stage2: int64
child 3, xrfm_security_kb: int64
languages: struct<arb: int64, en: int64, spa: int64, urd: int64>
child 0, arb: int64
child 1, en: int64
child 2, spa: int64
child 3, urd: int64
duplicates: struct<duplicates_by_source: struct<aya: int64, cybernative: int64, opencoder_stage2: int64, xrfm_se (... 363 chars omitted)
child 0, duplicates_by_source: struct<aya: int64, cybernative: int64, opencoder_stage2: int64, xrfm_security_kb: int64>
child 0, aya: int64
child 1, cybernative: int64
child 2, opencoder_stage2: int64
child 3, xrfm_security_kb: int64
child 1, exact_chatml: int64
child 2, exact_duplicate_rows: int64
child 3, most_repeated_prompt: string
child 4, most_repeated_prompt_count: int64
child 5, top_assistant_responses: list<item: struct<count: int64, response: string>>
child 0, item:
...
blocks_with_placeholder_comment: int64
child 3, blocks_with_x_plus_y: int64
child 4, code_block_languages: struct<python: int64>
child 0, python: int64
child 5, python_blocks_checked: int64
child 6, python_syntax_errors: int64
child 7, rows_with_code_blocks: int64
rows: int64
sources_with_multiple_licenses: list<item: null>
child 0, item: null
license_by_source: struct<aya: struct<Apache-2.0: int64>, cybernative: struct<Apache-2.0: int64>, opencoder_stage2: str (... 58 chars omitted)
child 0, aya: struct<Apache-2.0: int64>
child 0, Apache-2.0: int64
child 1, cybernative: struct<Apache-2.0: int64>
child 0, Apache-2.0: int64
child 2, opencoder_stage2: struct<MIT: int64>
child 0, MIT: int64
child 3, xrfm_security_kb: struct<CC0-1.0: int64>
child 0, CC0-1.0: int64
licenses: struct<Apache-2.0: int64, CC0-1.0: int64, MIT: int64>
child 0, Apache-2.0: int64
child 1, CC0-1.0: int64
child 2, MIT: int64
provenance_missing: int64
domains: struct<code: int64, defensive_security: int64, multilingual_qa: int64, rag_citation: int64>
child 0, code: int64
child 1, defensive_security: int64
child 2, multilingual_qa: int64
child 3, rag_citation: int64
pii_secrets: struct<aws_access_key: int64, bearer_token: int64, email: int64, hf_token_like: int64, private_key: (... 6 chars omitted)
child 0, aws_access_key: int64
child 1, bearer_token: int64
child 2, email: int64
child 3, hf_token_like: int64
child 4, private_key: int64
to
{'chatml': {'canonical_markers': Value('int64'), 'corrupt_marker_rows': Value('int64'), 'corrupt_markers': Value('int64'), 'empty_assistant_response': Value('int64'), 'expected_3_role_structure': Value('int64')}, 'code': {'blocks': Value('int64'), 'blocks_with_generic_func_id': Value('int64'), 'blocks_with_placeholder_comment': Value('int64'), 'blocks_with_x_plus_y': Value('int64'), 'code_block_languages': {'python': Value('int64')}, 'python_blocks_checked': Value('int64'), 'python_syntax_errors': Value('int64'), 'rows_with_code_blocks': Value('int64')}, 'domains': {'code': Value('int64'), 'defensive_security': Value('int64'), 'multilingual_qa': Value('int64'), 'rag_citation': Value('int64')}, 'duplicates': {'duplicates_by_source': {'aya': Value('int64'), 'cybernative': Value('int64'), 'opencoder_stage2': Value('int64'), 'xrfm_security_kb': Value('int64')}, 'exact_chatml': Value('int64'), 'exact_duplicate_rows': Value('int64'), 'most_repeated_prompt': Value('string'), 'most_repeated_prompt_count': Value('int64'), 'top_assistant_responses': List({'count': Value('int64'), 'response': Value('string')}), 'top_user_prompts': List({'count': Value('int64'), 'prompt': Value('string')}), 'unique_assistant_responses': Value('int64'), 'unique_chatml': Value('int64'), 'unique_user_prompts': Value('int64')}, 'languages': {'arb': Value('int64'), 'en': Value('int64'), 'spa': Value('int64'), 'urd': Value('int64')}, 'license_by_source': {'aya': {'Apache-2.0': Value('int64')}, 'cybernative': {'Apache-2.0': Value('int64')}, 'opencoder_stage2': {'MIT': Value('int64')}, 'xrfm_security_kb': {'CC0-1.0': Value('int64')}}, 'license_tiers': {'tier_a': Value('int64'), 'tier_b': Value('int64')}, 'licenses': {'Apache-2.0': Value('int64'), 'CC0-1.0': Value('int64'), 'MIT': Value('int64')}, 'pii_secrets': {'aws_access_key': Value('int64'), 'bearer_token': Value('int64'), 'email': Value('int64'), 'hf_token_like': Value('int64'), 'private_key': Value('int64')}, 'provenance_missing': Value('int64'), 'rows': Value('int64'), 'sources': {'aya': Value('int64'), 'cybernative': Value('int64'), 'opencoder_stage2': Value('int64'), 'xrfm_security_kb': Value('int64')}, 'sources_with_multiple_licenses': List(Value('null'))}
because column names don't matchNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
XRFM CoderSec SFT Dataset (published v1)
Published revision: 808d7505152eea93e6cd4af5f2269f43712afc2d
Actual size: 24,100 records. The 40k in the repository name is a target, not the published row count.
This file is the exact dataset used by the documented Track B QLoRA experiments. It is preserved unchanged for reproducibility. A quality audit found material defects; see Known issues before training on it.
Schema
Each JSONL row contains:
| Field | Type | Description |
|---|---|---|
record_id |
string | Stable record identifier |
source |
string | cybernative, aya, xrfm_security_kb or opencoder_stage2 |
language |
ISO 639-3-ish code | en, urd, arb or spa |
chatml |
string | Three-role system/user/assistant conversation |
domain |
string | defensive_security, multilingual_qa, rag_citation or code |
license |
SPDX string | Row-level source license |
license_tier |
string | tier_a or tier_b provenance tier |
code_blocks |
list | Extracted code blocks with language and code text |
provenance |
object | source_uri pointing to the upstream dataset |
Distribution (measured from the published file)
| Dimension | Count |
|---|---|
| Total rows | 24,100 |
| CyberNative / defensive security | 12,000 |
| AYA / multilingual QA | 6,000 |
| Project security KB / RAG citation | 4,000 |
| OpenCoder Stage-2 / code | 2,100 |
| Unique ChatML records | 12,107 |
| Exact duplicate rows | 11,993 |
| Rows with code blocks | 2,100 |
| Empty assistant responses | 0 |
| Provenance gaps | 0 |
Row licenses: Apache-2.0 (18,000), CC0-1.0 (4,000), MIT (2,100). The dataset-level license metadata is other because no single license covers all rows.
Sources and provenance
CyberNative/Code_Vulnerability_Security_DPO— Apache-2.0, revision1788f0a6….- AYA multilingual QA rows — Apache-2.0 (row-level declaration; upstream revision verification is a maintainer-review item).
- Project-authored
xrfm_security_kbdefensive-security snippets — CC0-1.0. OpenCoder-LLM/opc-sft-stage2— MIT, revision7d28f40d….
Security knowledge references cite OWASP ASVS, MITRE CWE and NIST SP 800-53 identifiers. Reuse terms for those external knowledge resources must be checked per document; no blanket SPDX claim is made here. See the license matrix in the source repository.
Filtering and validation performed by the publisher
The generating script scripts/build_and_publish_codersec_sft.py applied source-tier filtering, contamination checks against configs/eval/frozen_benchmarks_v1.json, a weaponization screen and a 40,000-example target. The published result was 24,100 validated records; strict validation rejected the remainder.
Known issues (measured, not inferred from a single sample)
- Malformed ChatML in 24,100 / 24,100 rows. Canonical
<|im_start|>and<|im_end|>markers are absent. The file uses corruptedlicsystem,licuser,licassistantandiritmarkers instead. - Placeholder implementations in 2,100 / 2,100 code rows. Every code block is a
def func_<id>(x, y)stub returningresult = x + y # placeholder, even for tasks such as sorting a list or reading a CSV file. The snippets are syntactically valid but do not solve the stated task. - High duplication. 11,993 exact duplicate rows; the 12,000 CyberNative rows collapse to 7 unique responses. The prompt "Write secure Python code for user authentication." appears 3,000 times.
- No evaluation of downstream utility. Presence in this dataset does not prove that a model learned secure coding behaviour.
A bounded regex scan found no obvious emails, AWS keys, private-key headers, bearer tokens or Hugging Face token-like strings. This is not a formal privacy audit.
Reproducible correction
The source repository provides scripts/filter_codersec_sft.py. It canonicalizes ChatML, drops placeholder-only code rows and deduplicates. On the published revision it produces 10,007 records (6,000 AYA, 4,000 security KB, 7 unique CyberNative records) and writes a manifest. The corrected output has not been published under this repository; it must be released as a separately versioned dataset so the checkpoint-training data remains unchanged.
Usage example
from datasets import load_dataset
ds = load_dataset("json", data_files="https://huggingface.co/datasets/ahmadrrrtx/xrfm-codersec-sft-40k/resolve/main/data/data.jsonl")
print(ds["train"][0])
Citation and limits
Cite the XRFM source repository's CITATION.cff. No DOI or peer-reviewed publication is claimed. Do not represent this dataset as 40,000 records and do not use it as evidence of production-grade cybersecurity capability.
- Downloads last month
- 47