Spaces:
Running
Running
github-actions[bot]
commited on
Commit
·
36cfd9d
1
Parent(s):
d289bff
Auto-sync from demo at Fri Nov 7 12:49:08 UTC 2025
Browse files
graphgen/operators/init/init_llm.py
CHANGED
|
@@ -12,12 +12,8 @@ class LLMFactory:
|
|
| 12 |
- http_api: HTTPClient
|
| 13 |
- openai_api: OpenAIClient
|
| 14 |
- ollama_api: OllamaClient
|
| 15 |
-
- ollama: OllamaWrapper
|
| 16 |
-
- deepspeed: DeepSpeedWrapper
|
| 17 |
- huggingface: HuggingFaceWrapper
|
| 18 |
-
- tgi: TGIWrapper
|
| 19 |
- sglang: SGLangWrapper
|
| 20 |
-
- tensorrt: TensorRTWrapper
|
| 21 |
"""
|
| 22 |
|
| 23 |
@staticmethod
|
|
@@ -43,15 +39,15 @@ class LLMFactory:
|
|
| 43 |
from graphgen.models.llm.local.hf_wrapper import HuggingFaceWrapper
|
| 44 |
|
| 45 |
return HuggingFaceWrapper(**config)
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
#
|
| 49 |
-
# return SGLangWrapper(**config)
|
| 50 |
|
| 51 |
-
|
| 52 |
-
from graphgen.models.llm.local.vllm_wrapper import VLLMWrapper
|
| 53 |
|
| 54 |
-
|
|
|
|
|
|
|
|
|
|
| 55 |
|
| 56 |
raise NotImplementedError(f"Backend {backend} is not implemented yet.")
|
| 57 |
|
|
|
|
| 12 |
- http_api: HTTPClient
|
| 13 |
- openai_api: OpenAIClient
|
| 14 |
- ollama_api: OllamaClient
|
|
|
|
|
|
|
| 15 |
- huggingface: HuggingFaceWrapper
|
|
|
|
| 16 |
- sglang: SGLangWrapper
|
|
|
|
| 17 |
"""
|
| 18 |
|
| 19 |
@staticmethod
|
|
|
|
| 39 |
from graphgen.models.llm.local.hf_wrapper import HuggingFaceWrapper
|
| 40 |
|
| 41 |
return HuggingFaceWrapper(**config)
|
| 42 |
+
if backend == "sglang":
|
| 43 |
+
from graphgen.models.llm.local.sglang_wrapper import SGLangWrapper
|
|
|
|
|
|
|
| 44 |
|
| 45 |
+
return SGLangWrapper(**config)
|
|
|
|
| 46 |
|
| 47 |
+
# if backend == "vllm":
|
| 48 |
+
# from graphgen.models.llm.local.vllm_wrapper import VLLMWrapper
|
| 49 |
+
#
|
| 50 |
+
# return VLLMWrapper(**config)
|
| 51 |
|
| 52 |
raise NotImplementedError(f"Backend {backend} is not implemented yet.")
|
| 53 |
|