Repository: kaito-project/kaito

Issue:
Enable reasoning output for deepseek series model
**Is your feature request related to a problem? Please describe.**

https://docs.vllm.ai/en/latest/features/reasoning_outputs.html

This feature is good. It enables you to get the reasoning steps during the inference.

**Describe the solution you'd like**

Add this feature `--enable-reasoning --reasoning-parser deepseek_r1` for deepseek models.

**Describe alternatives you've considered**

**Additional context**

Hints from issue comments:

Solution patch:
diff --git a/presets/workspace/models/deepseek/model.go b/presets/workspace/models/deepseek/model.go
index 02709a7..d37400e 100644
--- a/presets/workspace/models/deepseek/model.go
+++ b/presets/workspace/models/deepseek/model.go
@@ -37,14 +37,18 @@ var (
 		"pipeline":    "text-generation",
 	}
 	deepseekLlama8bRunParamsVLLM = map[string]string{
-		"dtype": "float16",
+		"dtype":            "float16",
+		"enable-reasoning": "",
+		"reasoning-parser": "deepseek_r1",
 	}
 	deepseekQwen14bRunParams = map[string]string{
 		"torch_dtype": "bfloat16",
 		"pipeline":    "text-generation",
 	}
 	deepseekQwen14bRunParamsVLLM = map[string]string{
-		"dtype": "float16",
+		"dtype":            "float16",
+		"enable-reasoning": "",
+		"reasoning-parser": "deepseek_r1",
 	}
 )
 
@@ -58,7 +62,7 @@ func (*llama8b) GetInferenceParameters() *model.PresetParam {
 		ImageAccessMode:           string(kaitov1beta1.ModelImageAccessModePublic),
 		DiskStorageRequirement:    "50Gi",
 		GPUCountRequirement:       "1",
-		TotalGPUMemoryRequirement: "14Gi",
+		TotalGPUMemoryRequirement: "16.5Gi",
 		PerGPUMemoryRequirement:   "0Gi", // We run DeepSeek using native vertical model parallel, no per GPU memory requirement.
 		RuntimeParam: model.RuntimeParam{
 			Transformers: model.HuggingfaceTransformersParam{
@@ -72,9 +76,6 @@ func (*llama8b) GetInferenceParameters() *model.PresetParam {
 				ModelName:      PresetDeepSeekR1DistillLlama8BModel,
 				ModelRunParams: deepseekLlama8bRunParamsVLLM,
 			},
-			// vllm requires the model specification to be exactly divisible by
-			// the number of GPUs(tensor parallel level).
-			DisableTensorParallelism: true,
 		},
 		ReadinessTimeout: time.Duration(30) * time.Minute,
 		Tag:              PresetDeepSeekTagMap["DeepSeekDistillLlama8B"],
@@ -114,9 +115,6 @@ func (*qwen14b) GetInferenceParameters() *model.PresetParam {
 				ModelName:      PresetDeepSeekR1DistillQwen14BModel,
 				ModelRunParams: deepseekQwen14bRunParamsVLLM,
 			},
-			// vllm requires the model specification to be exactly divisible by
-			// the number of GPUs(tensor parallel level).
-			DisableTensorParallelism: true,
 		},
 		ReadinessTimeout: time.Duration(30) * time.Minute,
 		Tag:              PresetDeepSeekTagMap["DeepSeekDistillQwen14B"],



Test patch:
diff --git a/test/e2e/preset_vllm_test.go b/test/e2e/preset_vllm_test.go
index 614c6a0..89cf270 100644
--- a/test/e2e/preset_vllm_test.go
+++ b/test/e2e/preset_vllm_test.go
@@ -52,7 +52,7 @@ var _ = Describe("Workspace Preset on vllm runtime", func() {
 		validateCompletionsEndpoint(workspaceObj)
 	})
 
-	It("should create a deepseek-distilled-qwen-14b workspace with preset public mode successfully", func() {
+	It("should create a deepseek-distilled-qwen-14b workspace with preset public mode successfully", utils.GinkgoLabelFastCheck, func() {
 		if !runLlama13B {
 			Skip("Skipping deepseek-distilled-qwen-14b workspace test")
 		}
@@ -238,7 +238,7 @@ func createDeepSeekLlama8BWorkspaceWithPresetPublicModeAndVLLM(numOfNode int) *k
 	workspaceObj := &kaitov1beta1.Workspace{}
 	By("Creating a workspace CR with DeepSeek Distilled Llama 8B preset public mode and vLLM", func() {
 		uniqueID := fmt.Sprint("preset-deepseek-", rand.Intn(1000))
-		workspaceObj = utils.GenerateInferenceWorkspaceManifestWithVLLM(uniqueID, namespaceName, "", numOfNode, "Standard_NC24ads_A100_v4",
+		workspaceObj = utils.GenerateInferenceWorkspaceManifestWithVLLM(uniqueID, namespaceName, "", numOfNode, "Standard_NC12s_v3",
 			&metav1.LabelSelector{
 				MatchLabels: map[string]string{"kaito-workspace": "public-preset-e2e-test-deepseek-llama-vllm"},
 			}, nil, PresetDeepSeekR1DistillLlama8BModel, kaitov1beta1.ModelImageAccessModePublic, nil, nil, nil)