Skip to content

Commit

Permalink
feat: Add DeepSeek Model for E2E (#850)
Browse files Browse the repository at this point in the history
  • Loading branch information
ishaansehgal99 authored Jan 30, 2025
1 parent 0ed89f2 commit 31bdf47
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 10 deletions.
2 changes: 1 addition & 1 deletion presets/workspace/models/deepseek/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (*llama8b) GetInferenceParameters() *model.PresetParam {
ModelRunParams: deepseekLlama8bRunParams,
},
VLLM: model.VLLMParam{
BaseCommand: baseCommandPresetDeepseekInference,
BaseCommand: inference.DefaultVLLMCommand,
ModelName: "/workspace/vllm/weights",
ModelRunParams: deepseekLlama8bRunParamsVLLM,
},
Expand Down
20 changes: 11 additions & 9 deletions test/e2e/preset_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,17 @@ import (
)

const (
PresetLlama2AChat = "llama-2-7b-chat"
PresetLlama2BChat = "llama-2-13b-chat"
PresetFalcon7BModel = "falcon-7b"
PresetFalcon40BModel = "falcon-40b"
PresetMistral7BInstructModel = "mistral-7b-instruct"
PresetQwen2_5Coder7BModel = "qwen2.5-coder-7b-instruct"
PresetPhi2Model = "phi-2"
PresetPhi3Mini128kModel = "phi-3-mini-128k-instruct"
WorkspaceHashAnnotation = "workspace.kaito.io/hash"
PresetLlama2AChat = "llama-2-7b-chat"
PresetLlama2BChat = "llama-2-13b-chat"
PresetFalcon7BModel = "falcon-7b"
PresetFalcon40BModel = "falcon-40b"
PresetMistral7BInstructModel = "mistral-7b-instruct"
PresetQwen2_5Coder7BModel = "qwen2.5-coder-7b-instruct"
PresetPhi2Model = "phi-2"
PresetPhi3Mini128kModel = "phi-3-mini-128k-instruct"
PresetDeepSeekR1DistillLlama8BModel = "deepseek-r1-distill-llama-8b"
PresetDeepSeekR1DistillQwen14BModel = "deepseek-r1-distill-qwen-14b"
WorkspaceHashAnnotation = "workspace.kaito.io/hash"
// WorkspaceRevisionAnnotation represents the revision number of the workload managed by the workspace
WorkspaceRevisionAnnotation = "workspace.kaito.io/revision"
)
Expand Down
34 changes: 34 additions & 0 deletions test/e2e/preset_vllm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,26 @@ var _ = Describe("Workspace Preset on vllm runtime", func() {
}
})

It("should create a deepseek-distilled-llama-8b workspace with preset public mode successfully", func() {
numOfNode := 1
workspaceObj := createDeepSeekLlama8BWorkspaceWithPresetPublicModeAndVLLM(numOfNode)

defer cleanupResources(workspaceObj)
time.Sleep(30 * time.Second)

validateCreateNode(workspaceObj, numOfNode)
validateResourceStatus(workspaceObj)

time.Sleep(30 * time.Second)

validateAssociatedService(workspaceObj)
validateInferenceConfig(workspaceObj)

validateInferenceResource(workspaceObj, int32(numOfNode), false)

validateWorkspaceReadiness(workspaceObj)
})

It("should create a falcon workspace with preset public mode successfully", func() {
numOfNode := 1
workspaceObj := createFalconWorkspaceWithPresetPublicModeAndVLLM(numOfNode)
Expand Down Expand Up @@ -153,6 +173,20 @@ var _ = Describe("Workspace Preset on vllm runtime", func() {
})
})

func createDeepSeekLlama8BWorkspaceWithPresetPublicModeAndVLLM(numOfNode int) *kaitov1alpha1.Workspace {
workspaceObj := &kaitov1alpha1.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",
&metav1.LabelSelector{
MatchLabels: map[string]string{"kaito-workspace": "public-preset-e2e-test-deepseek-vllm"},
}, nil, PresetDeepSeekR1DistillLlama8BModel, kaitov1alpha1.ModelImageAccessModePublic, nil, nil, nil)

createAndValidateWorkspace(workspaceObj)
})
return workspaceObj
}

func createFalconWorkspaceWithPresetPublicModeAndVLLM(numOfNode int) *kaitov1alpha1.Workspace {
workspaceObj := &kaitov1alpha1.Workspace{}
By("Creating a workspace CR with Falcon 7B preset public mode and vLLM", func() {
Expand Down

0 comments on commit 31bdf47

Please sign in to comment.