/ Модель

Характеристики

Контекст
28 723 токена
Параметры
2,2 млрд
Лицензия
MIT
Архитектура
yulanmini · dense
Опубликована
26 дек 2024

YuLan-Mini-Before-Annealing

Генерация текстаТекст → текст3 профессии

Промежуточный чекпойнт YuLan-Mini с состоянием оптимизатора для продолжения обучения и исследовательских экспериментов с языковой моделью.

34скачиваний за 30 дней7лайковвеса обновлены27 мар 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

YuLan-Mini-Before-Annealing — промежуточный контрольный чекпойнт языковой модели YuLan-Mini, разработанной и поддерживаемой AI Box при Народном университете Китая. Это плотная авторегрессионная модель на 2,2 млрд параметров с контекстом до 28 723 токенов. В репозитории сохранено состояние оптимизатора, поэтому чекпойнт предназначен прежде всего для продолжения обучения через Hugging Face Trainer и DeepSpeed Universal Checkpoint.

Чекпойнт можно использовать для продолжения предобучения, собственного этапа annealing на новых данных, изучения динамики обучения, синтеза данных и как отправную точку для дообучения instruct-модели. README приводит результаты промежуточных этапов на LAMBADA, GSM8K и HumanEval, но подчёркивает, что это не финальная версия YuLan-Mini. Модель принимает текст и генерирует текст; карточка указывает поддержку чата. Лицензия — MIT.

Сценарии применения

  • продолжение предобучения языковой модели из чекпойнта
  • обучение на собственном наборе данных с этапом annealing
  • исследование динамики обучения LLM
  • подготовка собственной instruct-модели на базе YuLan-Mini
  • синтез обучающих данных с помощью языковой модели

Ограничения

Это промежуточный чекпойнт до этапа annealing, а не финальная версия модели; для продолжения обучения требуется корректно восстановить состояние оптимизатора через Hugging Face Trainer и DeepSpeed Universal Checkpoint.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

IMPORTANT NOTICE: THIS IS AN INTERMEDIATE CHECKPOINT, NOT THE FINAL MODEL

Both YuLan-Mini and YuLan-Mini-Intermediate-4K were trained starting from this checkpoint.

This version includes the optimizer, allowing you to resume training using the Hugging Face Trainer and DeepSpeed Universal Checkpoint.

StageCurriculum Phase4K Context28K ContextOptimizerInference ArchLAMBADA AccGSM8K AccHumanEval pass@1
Stable5YuLan-Mini-Phase5yulanmini53.853.4112.26
Stable10YuLan-Mini-Phase10yulanmini55.009.5715.95
Stable15YuLan-Mini-Phase15✅yulanmini55.8113.8116.99
Stable20YuLan-Mini-Phase20✅yulanmini55.8121.3920.79
Stable25 (1T tokens)YuLan-Mini-Before-Annealing✅yulanmini55.6729.9434.06
Annealing26YuLan-Mini-4Kllama*64.7266.6561.60
Annealing27YuLan-Minillama*65.6768.4664.00

*: For easier inference and deployment, we merged the re-parameterized added parameters and scaling factors into the final released models (YuLan-Mini and YuLan-Mini-Intermediate-4K), enabling it to run on the Llama architecture. However, these parameters are still retained in the intermediate checkpoints from the training process.

What you can do with these pre-training resources

  1. Pre-train your own LLM. You can use our data and curriculum to train a model that's just as powerful as YuLan-Mini.
  2. Perform your own learning rate annealing. During the annealing phase, YuLan-Mini's learning ability is at its peak. You can resume training from the checkpoint before annealing and use your own dataset for learning rate annealing.
  3. Fine-tune the Instruct version of the LLM. You can use the YuLan-Mini base model to train your own Instruct version.
  4. Training dynamics research. You can use YuLan-Mini's intermediate checkpoints to explore internal changes during the pre-training process.
  5. Synthesize your own data. You can use YuLan-Mini's data pipeline to clean and generate your own dataset.

Continual Training Tutorial

Step 1: Modify the trainer_state.json

Due to the implementation of Hugging Face Trainer, certain parameters are stored in the trainer_state.json file and cannot be modified through the Trainer's command-line arguments. Therefore, you need to update these parameters in the trainer_state.json file first, particularly:

  • save_steps: The frequency of saving intermediate checkpoints.
  • train_batch_size: The batch size per GPU (equivalent to per_device_train_batch_size in the Trainer). We used a batch size of 1008 (approximately 4M tokens) during the stable training stage. Maintaining this same batch size is equally important for training effectiveness.

Below is an example of a properly configured trainer_state.json file:

{
  "best_metric": null,
  "best_model_checkpoint": null,
  "epoch": 0.0,
  "eval_steps": 500,
  "global_step": 0,
  "is_hyper_param_search": false,
  "is_local_process_zero": true,
  "is_world_process_zero": true,
  "log_history": [],
  "logging_steps": 3,
  "max_steps": 0,
  "num_input_tokens_seen": 0,
  "num_train_epochs": 0,
  "save_steps": 250,
  "stateful_callbacks": {
    "TrainerControl": {
      "args": {
        "should_epoch_stop": false,
        "should_evaluate": false,
        "should_log": false,
        "should_save": true,
        "should_training_stop": true
      },
      "attributes": {}
    }
  },
  "total_flos": 0,
  "train_batch_size": 3,
  "trial_name": null,
  "trial_params": null
}

Step 2: Enable Universal Checkpointing in the DeepSpeed Configuration

To ensure DeepSpeed Integration loads the Universal Checkpoint, you need to enable this feature in the DeepSpeed configuration JSON file.

Here is an example of a ZeRO2 configuration with Universal Checkpointing enabled:

{
  "bf16": {
    "enabled": "auto"
  },
  "zero_optimization": {
    "stage": 2,
    "allgather_partitions": true,
    "allgather_bucket_size": 8e8,
    "overlap_comm": true,
    "reduce_scatter": true,
    "reduce_bucket_size": 8e8,
    "contiguous_gradients": true
  },
  "gradient_accumulation_steps": "auto",
  "gradient_clipping": "auto",
  "steps_per_print": 16,
  "train_batch_size": "auto",
  "train_micro_batch_size_per_gpu": "auto",
  "wall_clock_breakdown": false,
  "dump_state": true,
  "optimizer": {
    "type": "AdamW",
    "params": {
      "lr": "auto",
      "betas": "auto",
      "eps": "auto",
      "weight_decay": "auto"
    }
  },
  "checkpoint": {
    "load_universal": true
  }
}

Step 3: Resume Training

When calling trainer.train, include the resume_from_checkpoint argument to load the distributed optimizer state from the Universal Checkpoint and resume training.

trainer.train(resume_from_checkpoint=training_args.resume_from_checkpoint)

We provide an internal training framework for your reference, but you are free to choose other frameworks.


The Team

YuLan-Mini is developed and maintained by AI Box, Renmin University of China.

License

  • The code in this repository is released under the MIT License.
  • Policies regarding the use of model weights, intermediate optimizer states, and training data will be announced in future updates.
  • Limitations: Despite our efforts to mitigate safety concerns and encourage the generation of ethical and lawful text, the probabilistic nature of language models may still lead to unexpected outputs. For instance, responses might contain bias, discrimination, or other harmful content. Please refrain from disseminating such content. We are not liable for any consequences arising from the spread of harmful information.

Citation

If you find YuLan-Mini helpful for your research or development, please cite our technical report:

@misc{hu2024yulanmini,
      title={YuLan-Mini: An Open Data-efficient Language Model}, 
      author={Yiwen Hu and Huatong Song and Jia Deng and Jiapeng Wang and Jie Chen and Kun Zhou and Yutao Zhu and Jinhao Jiang and Zican Dong and Wayne Xin Zhao and Ji-Rong Wen},
      year={2024},
      eprint={2412.17743},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2412.17743}, 
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Нельзя запустить

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

Класс архитектуры
YuLanMiniModelForCausalLM
Ревизия весов
7a063d0

0 моделей