File tree Expand file tree Collapse file tree
examples/models/qwen3_5_moe Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,7 +39,10 @@ DEFINE_string(
3939 " Path to file containing prompt text (overrides --prompt)." );
4040DEFINE_double (temperature, 0.8 , " Sampling temperature (0 = greedy)." );
4141DEFINE_int32 (max_new_tokens, 128 , " Maximum tokens to generate." );
42- DEFINE_bool (cuda_graph, false , " Enable CUDA graph for decode method. CUDA only." );
42+ DEFINE_bool (
43+ cuda_graph,
44+ false ,
45+ " Enable CUDA graph for decode method. CUDA only." );
4346
4447namespace llm = ::executorch::extension::llm;
4548using ::executorch::extension::from_blob;
@@ -86,9 +89,8 @@ static uint64_t read_token(const executorch::aten::Tensor& output) {
8689#else
8790 // logits_to_token handles 2D / 3D logits and Float / Half / BFloat16 /
8891 // UInt16 dtypes. Negative temperatures are clamped to 0 (greedy).
89- const float temp = FLAGS_temperature <= 0.0
90- ? 0 .0f
91- : static_cast <float >(FLAGS_temperature);
92+ const float temp =
93+ FLAGS_temperature <= 0.0 ? 0 .0f : static_cast <float >(FLAGS_temperature);
9294 return static_cast <uint64_t >(llm::logits_to_token (output, temp));
9395#endif
9496}
You can’t perform that action at this time.
0 commit comments