You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable configuration of various parameters in tools (#100)
* Enable configuration of various parameters in tools
Signed-off-by: Ira <IRAR@il.ibm.com>
* Review comments
Signed-off-by: Ira <IRAR@il.ibm.com>
---------
Signed-off-by: Ira <IRAR@il.ibm.com>
Copy file name to clipboardExpand all lines: README.md
+9-1Lines changed: 9 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -101,7 +101,15 @@ For more details see the <a href="https://docs.vllm.ai/en/stable/getting_started
101
101
-`inter-token-latency`: the time to 'generate' each additional token (in milliseconds), optional, by default zero
102
102
-`kv-cache-transfer-latency`: time for KV-cache transfer from a remote vLLM (in milliseconds), by default zero. Usually much shorter than `time-to-first-token`
103
103
-`seed`: random seed for operations (if not set, current Unix time in nanoseconds is used)
104
-
104
+
-`max-tool-call-integer-param`: the maximum possible value of integer parameters in a tool call, optional, defaults to 100
105
+
-`min-tool-call-integer-param`: the minimum possible value of integer parameters in a tool call, optional, defaults to 0
106
+
-`max-tool-call-number-param`: the maximum possible value of number (float) parameters in a tool call, optional, defaults to 100
107
+
-`min-tool-call-number-param`: the minimum possible value of number (float) parameters in a tool call, optional, defaults to 0
108
+
-`max-tool-call-array-param-length`: the maximum possible length of array parameters in a tool call, optional, defaults to 5
109
+
-`min-tool-call-array-param-length`: the minimum possible length of array parameters in a tool call, optional, defaults to 1
110
+
-`tool-call-not-required-param-probability`: the probability to add a parameter, that is not required, in a tool call, optional, defaults to 50
111
+
-`object-tool-call-not-required-field-probability`: the probability to add a field, that is not required, in an object in a tool call, optional, defaults to 50
112
+
105
113
In addition, as we are using klog, the following parameters are available:
106
114
-`add_dir_header`: if true, adds the file directory to the header of the log messages
107
115
-`alsologtostderr`: log to standard error as well as files (no effect when -logtostderr=true)
Copy file name to clipboardExpand all lines: pkg/llm-d-inference-sim/simulator.go
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -160,6 +160,15 @@ func (s *VllmSimulator) parseCommandParamsAndLoadConfig() error {
160
160
f.IntVar(&config.KVCacheTransferLatency, "kv-cache-transfer-latency", config.KVCacheTransferLatency, "Time for KV-cache transfer from a remote vLLM (in milliseconds)")
161
161
f.Int64Var(&config.Seed, "seed", config.Seed, "Random seed for operations (if not set, current Unix time in nanoseconds is used)")
162
162
163
+
f.IntVar(&config.MaxToolCallIntegerParam, "max-tool-call-integer-param", config.MaxToolCallIntegerParam, "Maximum possible value of integer parameters in a tool call")
164
+
f.IntVar(&config.MinToolCallIntegerParam, "min-tool-call-integer-param", config.MinToolCallIntegerParam, "Minimum possible value of integer parameters in a tool call")
165
+
f.Float64Var(&config.MaxToolCallNumberParam, "max-tool-call-number-param", config.MaxToolCallNumberParam, "Maximum possible value of number (float) parameters in a tool call")
166
+
f.Float64Var(&config.MinToolCallNumberParam, "min-tool-call-number-param", config.MinToolCallNumberParam, "Minimum possible value of number (float) parameters in a tool call")
167
+
f.IntVar(&config.MaxToolCallArrayParamLength, "max-tool-call-array-param-length", config.MaxToolCallArrayParamLength, "Maximum possible length of array parameters in a tool call")
168
+
f.IntVar(&config.MinToolCallArrayParamLength, "min-tool-call-array-param-length", config.MinToolCallArrayParamLength, "Minimum possible length of array parameters in a tool call")
169
+
f.IntVar(&config.ToolCallNotRequiredParamProbability, "tool-call-not-required-param-probability", config.ToolCallNotRequiredParamProbability, "Probability to add a parameter, that is not required, in a tool call")
170
+
f.IntVar(&config.ObjectToolCallNotRequiredParamProbability, "object-tool-call-not-required-field-probability", config.ObjectToolCallNotRequiredParamProbability, "Probability to add a field, that is not required, in an object in a tool call")
171
+
163
172
// These values were manually parsed above in getParamValueFromArgs, we leave this in order to get these flags in --help
164
173
vardummyStringstring
165
174
f.StringVar(&dummyString, "config", "", "The path to a yaml configuration file. The command line values overwrite the configuration file values")
@@ -462,7 +471,7 @@ func (s *VllmSimulator) reqProcessingWorker(ctx context.Context, id int) {
0 commit comments