syntax = "proto3";
package ek.worker.v1;
import "ek/object/v1/object.proto";
message ForwardReq {
message SequenceInfo { repeated string experts = 2; }
string instance_id = 1;
repeated SequenceInfo sequences = 2;
bytes tensor = 3;
}
message ForwardResp {
bytes output_tensor = 1;
}
service ComputationService {
rpc Forward(ForwardReq) returns (ForwardResp);
}
message ExpertState {
enum Stage {
STAGE_UNSPECIFIED = 0;
STAGE_ACTIVE = 1;
STAGE_LOADING = 2;
STAGE_EVICTING = 3;
}
Stage stage = 1;
}
message ExchangeReq {
string id = 1;
string addr = 2;
string channel = 3;
string device = 4;
bool last_will = 5;
uint32 rdma_tcp_port = 6;
repeated string loaded_experts = 7;
string wm_addr = 8;
uint64 mem_capacity_mb = 9;
map<string, uint64> expert_request_counts = 10;
}
message ExchangeResp {
message ExpertWithState { ek.object.v1.ExpertSlice target = 1; }
ExpertWithState state = 1;
bool preemption_complete = 2;
}
service StateService {
rpc Exchange(stream ExchangeReq) returns (stream ExchangeResp);
}