@@ -104,8 +104,9 @@ bool RemoteWorker::unlink_cluster(const std::vector<uint64_t>& cluster_ids,
104104 return channel_->unlink_cluster (cluster_ids, addrs, device_ips, ports);
105105}
106106
107- bool RemoteWorker::init_model (const std::string& model_weights_path) {
108- return channel_->init_model (model_weights_path);
107+ bool RemoteWorker::init_model (const std::string& model_weights_path,
108+ int32_t random_seed) {
109+ return channel_->init_model (model_weights_path, random_seed);
109110}
110111
111112std::tuple<int64_t , int64_t > RemoteWorker::estimate_kv_cache_capacity () {
@@ -190,14 +191,17 @@ folly::SemiFuture<folly::Unit> RemoteWorker::process_group_test_async() {
190191}
191192
192193folly::SemiFuture<bool > RemoteWorker::init_model_async (
193- const std::string& model_weights_path) {
194+ const std::string& model_weights_path,
195+ int32_t random_seed) {
194196 folly::Promise<bool > promise;
195197 auto future = promise.getSemiFuture ();
196- threadpool_.schedule (
197- [this , model_weights_path, promise = std::move (promise)]() mutable {
198- // call InitModel with callback
199- channel_->init_model_async (model_weights_path, promise);
200- });
198+ threadpool_.schedule ([this ,
199+ model_weights_path,
200+ random_seed,
201+ promise = std::move (promise)]() mutable {
202+ // call InitModel with callback
203+ channel_->init_model_async (model_weights_path, random_seed, promise);
204+ });
201205 return future;
202206}
203207
0 commit comments