|
10 | 10 |
|
11 | 11 | namespace infinilm::engine { |
12 | 12 |
|
13 | | -/** |
14 | | - * @deprecated This function is deprecated and will be REMOVED in the next major release (v0.2.0). |
15 | | - * |
16 | | - * ⚠️ DEVELOPMENT POLICY: |
17 | | - * - NO new development or feature additions permitted on this interface |
18 | | - * - Only critical bug fixes (security/stability) allowed until removal |
19 | | - * - All new code MUST migrate to the polymorphic overload below |
20 | | - * |
21 | | - * Replacement: Use the polymorphic overload of this same function name with updated signature |
22 | | - * Reason: Legacy signature lacks support for dynamic quantization modes. |
23 | | - * Removal target: v0.2.0 (Q2 2026) |
24 | | - */ |
25 | | -RankWorker::RankWorker(const InfinilmModel::Config &model_config, |
26 | | - const distributed::RankInfo &rank_info, |
27 | | - const cache::CacheConfig *cache_config, |
28 | | - RankBarrier *barrier, |
29 | | - bool enable_graph_compiling, |
30 | | - backends::AttentionBackend attention_backend) |
31 | | - : legacy_model_config_(model_config), |
32 | | - rank_info_(rank_info), |
33 | | - attention_backend_(attention_backend), |
34 | | - enable_graph_compiling_(enable_graph_compiling), |
35 | | - job_cmd_(Command::INIT), |
36 | | - has_job_(false), |
37 | | - job_done_(false), |
38 | | - should_exit_(false), |
39 | | - init_done_(false), |
40 | | - rng_(std::random_device{}()), |
41 | | - barrier_(barrier) { |
42 | | - if (cache_config != nullptr) { |
43 | | - pending_cache_config_ = cache_config->unique_copy(); |
44 | | - } |
45 | | - // start the thread |
46 | | - thread_ = std::thread(&RankWorker::thread_loop, this); |
47 | | - |
48 | | - // Wait until the worker thread finishes initialization (model created) |
49 | | - std::unique_lock<std::mutex> lk(mutex_); |
50 | | - cv_.wait(lk, [&] { return init_done_; }); |
51 | | -} |
52 | | - |
53 | 13 | RankWorker::RankWorker( |
54 | 14 | std::shared_ptr<infinilm::global_state::InfinilmConfig> infinilm_config, |
55 | 15 | const distributed::RankInfo &rank_info, |
@@ -269,15 +229,6 @@ void RankWorker::thread_loop() { |
269 | 229 | infinilm::global_state::initialize_infinilm_config(infinilm_config_); |
270 | 230 |
|
271 | 231 | // Create model using factory (may be expensive) |
272 | | - if (model_config_ == nullptr) { |
273 | | - // model_ = InfinilmModelFactory::createModel( |
274 | | - // legacy_model_config_, |
275 | | - // rank_info_, |
276 | | - // pending_cache_config_ != nullptr ? pending_cache_config_.get() : nullptr, |
277 | | - // attention_backend_); |
278 | | - throw std::runtime_error("RankWorker::thread_loop(): the way of creating models using LlamaConfig is no longer supported !!!"); |
279 | | - } |
280 | | - |
281 | 232 | const std::string &model_type = model_config_->get<std::string>("model_type"); |
282 | 233 | const auto &model_map = models::get_causal_lm_model_map(); |
283 | 234 | auto it = model_map.find(model_type); |
|
0 commit comments