Files
project_6/upstream_ref/xllm/xllm/proto/embedding.proto
EX Engine 002f9879b2 ref(upstream): FULL TREE — Deep-Spark xllm (1470) + ds_vllm csrc/models (703)
Replaces cherry-picked upstream_ref with complete source trees.

xllm/ — Iluvatar official C++ inference engine (15MB, 1470 files)
  Complete: kernels → layers → models → runtime → scheduler → api
  Excluded: .git, binary images, third_party submodule checkouts

ds_vllm/ — Iluvatar official vllm fork (8MB, 703 files)
  Included: csrc/ (ALL CUDA kernels), fused_moe/, qwen3_5 model, _custom_ops
  Excluded: tests, benchmarks, docs, examples (not needed for reference)

Critical call chains now fully traceable:
  MoE: moe_topk_softmax_kernels.cuh → ixformer.h → fused_moe.cpp → layer
  GDN: qwen3_gated_delta_net_base.cpp → qwen3_5_gated_delta_net.cpp
  Attention: ixformer.h → xllm_paged_attention → attention.cpp
2026-08-10 02:54:03 +00:00

107 lines
3.5 KiB
Protocol Buffer

syntax = "proto3";
option go_package = "jd.com/jd-infer/xllm;xllm";
package xllm.proto;
import "common.proto";
import "multimodal.proto";
import "tensor.proto";
import "embedding_data.proto";
message EmbeddingRequest {
// ID of the model to use. You can use the ListModels endpoint to list available models.
string model = 1;
// Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays.
// The input must not exceed the max input tokens for the model (8192 tokens for text-embedding-ada-002),
// cannot be an empty string, and any array must be 2048 dimensions or less. Example Python code for counting tokens.
// Some models may also impose a limit on total number of tokens summed across inputs.
string input = 2;
//oneof input {
// // string, The string that will be turned into an embedding.
// string input_str = 2;
//
// // array, The array of strings that will be turned into an embedding.
// repeated string input_arr_str = 3;
//
// // array, The array of integers that will be turned into an embedding.
// repeated int32 input_arr_int = 4;
//
// // array, The array of arrays containing integers that will be turned into an embedding.
// repeated repeated int32 input_arr_arr_int = 5;
//}
// The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.
optional int32 dimensions = 6;
// The format to return the embeddings in. Can be either float or base64.
// [default = "float"]
optional string encoding_format = 7;
// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.
optional string user = 8;
optional string service_request_id = 9;
optional bool add_special_tokens = 10;
}
message EmbeddingResponseData {
// The index of the embedding in the input array.
int32 index = 1;
// The object type of the embedding.
// [default = "embedding"]
string object = 2;
// The embedding vector.
repeated float embedding = 3;
repeated Embedding mm_embeddings = 4;
//oneof embedding {
// // float, The embedding vector as an array of floats.
// repeated float float_values = 3;
//
// // string, The embedding vector as a base64 encoded string.
// string base64_data = 4;
//}
}
message EmbeddingResponse {
// The ID of the embedding response.
string id = 1;
// The object type of the embedding response.
// [default = "list"]
string object = 2;
// The Unix timestamp of when the embedding response was created.
int64 created = 3;
// The model used to generate the embedding response.
string model = 4;
// The list of embedding response data.
repeated EmbeddingResponseData data = 5;
// Usage information for the embedding response.
Usage usage = 6;
}
message MMEmbeddingRequest {
// ID of the model to use. You can use the ListModels endpoint to list available models.
string model = 1;
repeated MMChatMessage messages = 3;
// The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.
optional int32 dimensions = 6;
// The format to return the embeddings in. Can be either float or base64.
// [default = "float"]
optional string encoding_format = 7;
// A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse.
optional string user = 8;
optional string service_request_id = 9;
}