Compare commits

..

1 Commits

Author SHA1 Message Date
Wing Lian
3cf22ae23b tag v0.12.2
Some checks failed
ci-cd / build-axolotl (<nil>, 126, 12.6.3, 3.11, 2.6.0) (push) Has been cancelled
ci-cd / build-axolotl (<nil>, 126, 12.6.3, 3.11, 2.7.0) (push) Has been cancelled
ci-cd / build-axolotl (<nil>, 128, 12.8.1, 3.11, 2.7.1) (push) Has been cancelled
ci-cd / build-axolotl (vllm, 126, 12.6.3, true, 3.11, 2.7.1) (push) Has been cancelled
publish pypi / Create Release (push) Has been cancelled
ci-cd / build-axolotl-cloud (<nil>, 126, 12.6.3, 3.11, 2.6.0) (push) Has been cancelled
ci-cd / build-axolotl-cloud (<nil>, 126, 12.6.3, 3.11, 2.7.0) (push) Has been cancelled
ci-cd / build-axolotl-cloud (<nil>, 126, 12.6.3, <nil>, 3.11, 2.7.1) (push) Has been cancelled
ci-cd / build-axolotl-cloud (<nil>, 128, 12.8.1, 3.11, 2.7.1) (push) Has been cancelled
ci-cd / build-axolotl-cloud (vllm, 126, 12.6.3, true, 3.11, 2.7.1) (push) Has been cancelled
ci-cd / build-axolotl-cloud-no-tmux (<nil>, 126, 12.6.3, 3.11, 2.6.0) (push) Has been cancelled
ci-cd / build-axolotl-cloud-no-tmux (<nil>, 126, 12.6.3, <nil>, 3.11, 2.7.1) (push) Has been cancelled
ci-cd / build-axolotl-cloud-no-tmux (vllm, 126, 12.6.3, true, 3.11, 2.7.1) (push) Has been cancelled
publish pypi / Upload release to PyPI (push) Has been cancelled
2025-08-18 08:48:53 -04:00
6 changed files with 7 additions and 13 deletions

View File

@@ -12,7 +12,7 @@ output_dir: ./outputs/lora-out
adapter: lora
lora_model_dir:
sequence_len:
sequence_len: 2048
sample_packing: true
eval_sample_packing: true

View File

@@ -4,4 +4,4 @@ import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__) # Make this a namespace package
__version__ = "0.13.0.dev"
__version__ = "0.12.2"

View File

@@ -268,10 +268,7 @@ class ModelLoader:
hasattr(self.model, "config")
and hasattr(self.model.config, "max_position_embeddings")
and self.model.config.max_position_embeddings
and (
self.cfg.sequence_len is not None
and self.cfg.sequence_len > self.model.config.max_position_embeddings
)
and self.cfg.sequence_len > self.model.config.max_position_embeddings
):
LOG.warning(
"increasing model.config.max_position_embeddings from "

View File

@@ -91,7 +91,7 @@ class PromptTokenizingStrategy(abc.ABC):
if (
result["input_ids"][-1] != self.tokenizer.eos_token_id
and (self.max_length is None or len(result["input_ids"]) < self.max_length)
and len(result["input_ids"]) < self.max_length
and add_eos_token
):
result["input_ids"].append(self.tokenizer.eos_token_id)

View File

@@ -408,7 +408,7 @@ class AxolotlInputConfig(
unfrozen_parameters: list[str] | None = None
sequence_len: int | None = Field(
sequence_len: int = Field(
default=512,
json_schema_extra={
"description": "The maximum length of an input to train with, this should typically be less than 2048 as most models have a token/context limit of 2048"

View File

@@ -229,10 +229,7 @@ def drop_long_seq(sample, sequence_len=2048, min_sequence_len=2):
results = []
for seq in input_ids:
length = len(seq)
if sequence_len is not None:
results.append(min_sequence_len <= length <= sequence_len)
else:
results.append(min_sequence_len <= length)
results.append(min_sequence_len <= length <= sequence_len)
return results
@@ -408,7 +405,7 @@ def calculate_total_num_steps(cfg, train_dataset, update=True):
if update:
cfg.total_num_tokens = total_num_tokens
skip_estimates = cfg.sequence_len is None or cfg.model_config_type == "mamba"
skip_estimates = cfg.model_config_type == "mamba"
if (
not skip_estimates