ndc8 commited on
Commit ·
c6f7b75
1
Parent(s): 88c3c6c
Update model to unsloth/DeepSeek-R1-0528-Qwen3-8B-GGUF
Browse files- Changed current_model in backend_service.py
- Updated ChatCompletionRequest default model
- Updated all test files to use new model
- Updated requirements.txt comment
- DeepSeek R1-0528 is a more modern and capable model than the previous gemma model
Files changed (5)
74 unmodified lines7576777879808142 unmodified lines12412512612712812913074 unmodified linesreturn vclass ChatCompletionRequest(BaseModel):model: str = Field(default="gemma-3n-E4B-it-GGUF", description="The model to use for completion")messages: List[ChatMessage] = Field(..., description="List of messages in the conversation")max_tokens: Optional[int] = Field(default=512, ge=1, le=2048, description="Maximum tokens to generate")temperature: Optional[float] = Field(default=0.7, ge=0.0, le=2.0, description="Sampling temperature")42 unmodified lines# Global variables for model managementinference_client: Optional[InferenceClient] = Noneimage_text_pipeline = None # type: ignorecurrent_model = "gemma-3n-E4B-it-GGUF"vision_model = "Salesforce/blip-image-captioning-base" # Working model for image captioningtokenizer = None74 unmodified lines7576777879808142 unmodified lines12412512612712812913074 unmodified linesreturn vclass ChatCompletionRequest(BaseModel):model: str = Field(default="unsloth/DeepSeek-R1-0528-Qwen3-8B-GGUF", description="The model to use for completion")messages: List[ChatMessage] = Field(..., description="List of messages in the conversation")max_tokens: Optional[int] = Field(default=512, ge=1, le=2048, description="Maximum tokens to generate")temperature: Optional[float] = Field(default=0.7, ge=0.0, le=2.0, description="Sampling temperature")42 unmodified lines# Global variables for model managementinference_client: Optional[InferenceClient] = Noneimage_text_pipeline = None # type: ignorecurrent_model = "unsloth/DeepSeek-R1-0528-Qwen3-8B-GGUF"vision_model = "Salesforce/blip-image-captioning-base" # Working model for image captioningtokenizer = None
4 unmodified lines5678910114 unmodified linesPillow>=10.0.0accelerate>=0.24.0requests>=2.31.0# NOTE: GGUF models like 'gemma-3n-E4B-it-GGUF' must be downloaded manually or referenced from HuggingFace, not pip-installed.fastapi>=0.100.0uvicorn[standard]>=0.23.0pydantic>=2.0.04 unmodified lines5678910114 unmodified linesPillow>=10.0.0accelerate>=0.24.0requests>=2.31.0# NOTE: GGUF models like 'unsloth/DeepSeek-R1-0528-Qwen3-8B-GGUF' must be downloaded manually or referenced from HuggingFace, not pip-installed.fastapi>=0.100.0uvicorn[standard]>=0.23.0pydantic>=2.0.0
4 unmodified lines5678910114 unmodified lines# Example payload for OpenAI-compatible chat completionpayload = {"model": "gemma-3n-E4B-it-GGUF","messages": [{"role": "system", "content": "You are a helpful assistant."},{"role": "user", "content": "Hello, who won the world cup in 2018?"}4 unmodified lines5678910114 unmodified lines# Example payload for OpenAI-compatible chat completionpayload = {"model": "unsloth/DeepSeek-R1-0528-Qwen3-8B-GGUF","messages": [{"role": "system", "content": "You are a helpful assistant."},{"role": "user", "content": "Hello, who won the world cup in 2018?"}
41 unmodified lines4243444546474841 unmodified linesprint("🖼️ Testing multimodal chat completion...")payload = {"model": "unsloth/gemma-3n-E4B-it-GGUF","messages": [{"role": "user",41 unmodified lines4243444546474841 unmodified linesprint("🖼️ Testing multimodal chat completion...")payload = {"model": "unsloth/DeepSeek-R1-0528-Qwen3-8B-GGUF","messages": [{"role": "user",
18 unmodified lines1920212223242518 unmodified linesmodels_to_try = ["Salesforce/blip-image-captioning-base", # More common model"microsoft/git-base-textcaps", # Alternative model"unsloth/gemma-3n-E4B-it-GGUF" # Original model]for model_name in models_to_try:18 unmodified lines1920212223242518 unmodified linesmodels_to_try = ["Salesforce/blip-image-captioning-base", # More common model"microsoft/git-base-textcaps", # Alternative model"unsloth/DeepSeek-R1-0528-Qwen3-8B-GGUF" # Updated model]for model_name in models_to_try:
backend_service.py+2-2
requirements.txt+1-1
test_hf_api.py+1-1
test_multimodal.py+1-1
test_pipeline.py+1-1