Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot]362056402517
diff --git a/tests/test_raw_text.py b/tests/test_raw_text.pyindex 7c7272a551c..9f2e8cda4eb 100644--- a/tests/test_raw_text.py+++ b/tests/test_raw_text.py@@ -125,8 +125,12 @@ def test_raw_text_loader():), "input_ids and attention_mask should have same length"# Verify labels field exists (for causal LM training)- assert "labels" in tokenized_dataset.column_names, "Dataset should have 'labels' column"- assert first_sample["labels"] == first_sample["input_ids"], "labels should match input_ids"+ assert (+ "labels" in tokenized_dataset.column_names+ ), "Dataset should have 'labels' column"+ assert (+ first_sample["labels"] == first_sample["input_ids"]+ ), "labels should match input_ids"# Test constructor validationtry:diff --git a/unsloth/dataprep/raw_text.py b/unsloth/dataprep/raw_text.pyindex da64565bbcd..ba010edabb9 100644--- a/unsloth/dataprep/raw_text.py+++ b/unsloth/dataprep/raw_text.py@@ -97,7 +97,11 @@ class RawTextDataLoader:# Labels are same as input_ids for causal LM traininglabels = [list(ids) for ids in input_ids]return Dataset.from_dict(- {"input_ids": input_ids, "attention_mask": attention_mask, "labels": labels}+ {+ "input_ids": input_ids,+ "attention_mask": attention_mask,+ "labels": labels,+ })else:# If chunks are text strings (backward compatibility)