By Sagar Shankaran, Founder of CallSphere
JSONL is the standard data format for LLM fine-tuning. Learn why JSON Lines works best, how NeMo Curator processes raw data into JSONL, and best practices for training datasets.
Key takeaways
Before a large language model can learn from your data, that data needs to be in a format the training pipeline can efficiently process. The wrong format creates bottlenecks, wastes compute, and introduces errors. The right format enables scalable, parallel, distributed processing across GPU clusters.
The industry standard for LLM fine-tuning data is JSONL (JSON Lines) — a lightweight, line-delimited format where each line contains a separate, self-contained JSON object.
JSONL (also called JSON Lines or newline-delimited JSON) is a text format where each line is a valid JSON object. Unlike standard JSON, which wraps everything in a single array or object, JSONL treats each line independently.
flowchart LR
DATA[("Curated dataset<br/>instruction or chat")]
CLEAN["Clean and dedupe<br/>PII filter"]
TOK["Tokenize and pack"]
METHOD{"Method"}
LORA["LoRA or QLoRA<br/>adapters only"]
SFT["Full SFT<br/>all params"]
DPO["DPO or RLHF<br/>preference learning"]
EVAL["Held out eval<br/>plus regression suite"]
DEPLOY[("Adapter or<br/>merged model")]
DATA --> CLEAN --> TOK --> METHOD
METHOD --> LORA --> EVAL
METHOD --> SFT --> EVAL
METHOD --> DPO --> EVAL
EVAL --> DEPLOY
style METHOD fill:#4f46e5,stroke:#4338ca,color:#fff
style EVAL fill:#f59e0b,stroke:#d97706,color:#1f2937
style DEPLOY fill:#059669,stroke:#047857,color:#fff
Example JSONL for instruction fine-tuning:
{"instruction": "Summarize the key benefits of RAG.", "response": "RAG combines retrieval with generation to reduce hallucinations, ground responses in source documents, and enable knowledge updates without retraining."}
{"instruction": "What is LoRA fine-tuning?", "response": "LoRA (Low-Rank Adaptation) is a parameter-efficient fine-tuning method that trains small adapter matrices instead of updating all model weights, reducing compute and memory requirements by 10-100x."}
Each line is a complete training example. No commas between lines. No wrapping array. This simplicity is what makes JSONL powerful at scale.
Because each line is independent, JSONL files can be processed line by line without loading the entire file into memory. This enables streaming processing of terabyte-scale datasets and parallel ingestion across distributed GPU clusters.
Hear it before you finish reading
Talk to a live CallSphere AI voice agent in your browser — 60 seconds, no signup.
JSONL files can be split at any line boundary without breaking the format. This makes it trivial to shard datasets across multiple training nodes or to create train/validation/test splits.
Every major LLM training framework — Hugging Face Transformers, NVIDIA NeMo, DeepSpeed, Megatron-LM — natively supports JSONL input. It is also directly compatible with data processing tools like RAPIDS cuDF for GPU-accelerated data manipulation.
Unlike binary formats, JSONL is human-readable. You can inspect, debug, and validate individual training examples with standard text tools — grep, head, jq, or any text editor.
NVIDIA's NeMo Curator provides a production-grade pipeline for converting raw data from diverse sources into clean, training-ready JSONL files. The pipeline follows five stages:
The pipeline begins with pointers to raw data sources — web URLs, local file paths, or cloud storage locations. Sources can include HTML pages, PDFs, XML documents, plain text files, or any other structured or unstructured format.
Files are downloaded in parallel across multiple workers. For web sources, this includes handling rate limiting, retries, and deduplication of URLs. For local sources, files are read from disk with efficient I/O scheduling.
Downloaded files are loaded into memory-efficient data structures. For large-scale datasets, this uses Dask DataFrames backed by GPU-accelerated cuDF, enabling processing of datasets that exceed available RAM.
Still reading? Stop comparing — try CallSphere live.
CallSphere ships complete AI voice agents per industry — 14 tools for healthcare, 10 agents for real estate, 4 specialists for salons. See how it actually handles a call before you book a demo.
This is the critical transformation step. Raw formats are converted into clean text:
The extracted text is written as JSONL files, ready for downstream processing (deduplication, quality filtering, classification) and ultimately for model training.
The entire pipeline is parallelized and distributed, configurable through YAML configuration files, and supports custom extraction functions for specialized data types.
JSONL handles nested structures, multi-line text, and special characters naturally, while CSV requires complex escaping rules that frequently break with real-world text data. JSONL also supports arbitrary fields per record and is natively compatible with all major LLM training frameworks. CSV is better suited for simple tabular data, not instruction-response pairs with long-form text.
For instruction fine-tuning, the minimum fields are "instruction" (the user prompt) and "response" (the target model output). For chat fine-tuning, use a "messages" array with role/content objects. Optional but recommended fields include "system" (system prompt), "source" (data provenance), and metadata fields for filtering.
Individual JSONL files can be any size, but practical considerations suggest splitting at 1-10 GB per file for efficient parallel loading. Most training frameworks support reading from multiple JSONL files (a directory of shards), which enables better parallelism and fault tolerance during distributed training.
Yes. Parquet is increasingly popular for large-scale LLM training because it offers columnar compression, efficient filtering, and better I/O performance for very large datasets. However, JSONL remains the most universal format — every framework supports it, it is human-readable, and it requires no special tooling to create or inspect. Many teams use JSONL for development and Parquet for production-scale training.
NeMo Curator uses specialized extractors for each input format. HTML extraction removes boilerplate (navigation, footers, ads) and extracts main content text. PDF extraction handles layout-aware text parsing, including multi-column layouts and embedded tables. Both extractors output clean text that is then written to JSONL format for downstream processing.

Written by
Sagar Shankaran· Founder, CallSphere
LinkedInSagar Shankaran is the founder of CallSphere, where he builds production AI voice and chat agents deployed across healthcare, hospitality, real estate, and home services. He writes about agentic AI, LLM engineering, and shipping voice agents that handle real calls in production.
See how AI voice agents work for your industry. Live demo available -- no signup required.
How generative AI produces verified dbt models for data migration — from scratch and incrementally — with SME validation and strict data governance.
CallSphere's Suburb Intelligence agent fuses schools, demographics, commute, and forecasts in real time. On Vapi, you build all of it. The data engineering breakdown.
Synthetic data generation has become a core methodology for training competitive AI models. Learn how leading labs create synthetic training data, maintain quality controls, and avoid model collapse.
Learn how to use large language models to generate, filter, and validate synthetic training data for fine-tuning smaller models, with techniques for ensuring quality, diversity, and deduplication.
Master the art of building high-quality fine-tuning datasets with practical techniques for data collection, cleaning, deduplication, format validation, and diversity analysis.
Build an ETL pipeline that extracts conversation logs from AI agent systems, anonymizes PII, transforms them into training-ready formats, and filters for quality to improve agent performance.
© 2026 CallSphere Inc. All rights reserved.
Made within San Francisco
Watch how CallSphere handles real customer calls, schedules appointments, and processes payments — live.
Try Live DemoBook a DemoCalculate Your ROI