| 1892 | } |
| 1893 | |
| 1894 | float lr_opt::get_lr(float epoch) const { |
| 1895 | float r = lr_min <= 0 ? lr0 : |
| 1896 | epoch >= decay_epochs ? lr_min : |
| 1897 | lr0 * std::pow(0.5f, epoch * scale_epoch); |
| 1898 | LOG_INF("epoch %.2g lr=%.2g\n", epoch, r); |
| 1899 | return r; |
| 1900 | } |
| 1901 | |
| 1902 | bool common_replay_last_token(struct llama_context * ctx, llama_token last_token, int32_t pos) { |
| 1903 | llama_batch batch = llama_batch_get_one(&last_token, 1); |
no test coverage detected