Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
62a4a339
Unverified
Commit
62a4a339
authored
Nov 22, 2024
by
Xuehai Pan
Committed by
GitHub
Nov 22, 2024
Browse files
docs: fix module docstrings and copyright headers (#2077)
parent
2797bc34
Changes
83
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
269 additions
and
288 deletions
+269
-288
python/sglang/srt/models/dbrx.py
python/sglang/srt/models/dbrx.py
+14
-15
python/sglang/srt/models/deepseek.py
python/sglang/srt/models/deepseek.py
+14
-14
python/sglang/srt/models/deepseek_v2.py
python/sglang/srt/models/deepseek_v2.py
+14
-14
python/sglang/srt/models/exaone.py
python/sglang/srt/models/exaone.py
+14
-15
python/sglang/srt/models/gemma.py
python/sglang/srt/models/gemma.py
+14
-14
python/sglang/srt/models/gemma2.py
python/sglang/srt/models/gemma2.py
+14
-14
python/sglang/srt/models/gemma2_reward.py
python/sglang/srt/models/gemma2_reward.py
+13
-14
python/sglang/srt/models/gpt_bigcode.py
python/sglang/srt/models/gpt_bigcode.py
+14
-14
python/sglang/srt/models/grok.py
python/sglang/srt/models/grok.py
+14
-14
python/sglang/srt/models/internlm2.py
python/sglang/srt/models/internlm2.py
+13
-15
python/sglang/srt/models/internlm2_reward.py
python/sglang/srt/models/internlm2_reward.py
+13
-14
python/sglang/srt/models/llama.py
python/sglang/srt/models/llama.py
+13
-14
python/sglang/srt/models/llama_classification.py
python/sglang/srt/models/llama_classification.py
+13
-14
python/sglang/srt/models/llama_reward.py
python/sglang/srt/models/llama_reward.py
+13
-14
python/sglang/srt/models/llava.py
python/sglang/srt/models/llava.py
+13
-15
python/sglang/srt/models/llavavid.py
python/sglang/srt/models/llavavid.py
+13
-15
python/sglang/srt/models/minicpm.py
python/sglang/srt/models/minicpm.py
+13
-15
python/sglang/srt/models/minicpm3.py
python/sglang/srt/models/minicpm3.py
+13
-15
python/sglang/srt/models/mistral.py
python/sglang/srt/models/mistral.py
+13
-15
python/sglang/srt/models/mixtral.py
python/sglang/srt/models/mixtral.py
+14
-14
No files found.
python/sglang/srt/models/dbrx.py
View file @
62a4a339
"""
# Copyright 2023-2024 SGLang Team
Copyright 2023-2024 SGLang Team
# Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
# limitations under the License.
limitations under the License.
# ==============================================================================
"""
# Adapted from:
# Adapted from:
# https://github.com/vllm-project/vllm/blob/c7f2cf2b7f67bce5842fedfdba508440fe257375/vllm/model_executor/models/dbrx.py#L1
# https://github.com/vllm-project/vllm/blob/c7f2cf2b7f67bce5842fedfdba508440fe257375/vllm/model_executor/models/dbrx.py#L1
# coding=utf-8
from
typing
import
Iterable
,
Optional
,
Tuple
from
typing
import
Iterable
,
Optional
,
Tuple
import
torch
import
torch
...
...
python/sglang/srt/models/deepseek.py
View file @
62a4a339
"""
# Copyright 2023-2024 SGLang Team
Copyright 2023-2024 SGLang Team
# Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
# limitations under the License.
limitations under the License.
# ==============================================================================
"""
# Adapted from:
# Adapted from:
# https://github.com/vllm-project/vllm/blob/14f91fe67c2342f2fe859dc6a5c40810df0e1c61/vllm/model_executor/models/deepseek.py
# https://github.com/vllm-project/vllm/blob/14f91fe67c2342f2fe859dc6a5c40810df0e1c61/vllm/model_executor/models/deepseek.py
"""Inference-only Deepseek model."""
"""Inference-only Deepseek model."""
from
typing
import
Any
,
Dict
,
Iterable
,
Optional
,
Tuple
from
typing
import
Any
,
Dict
,
Iterable
,
Optional
,
Tuple
import
torch
import
torch
...
...
python/sglang/srt/models/deepseek_v2.py
View file @
62a4a339
"""
# Copyright 2023-2024 SGLang Team
Copyright 2023-2024 SGLang Team
# Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
# limitations under the License.
limitations under the License.
# ==============================================================================
"""
# Adapted from:
# Adapted from:
# https://github.com/vllm-project/vllm/blob/fb6af8bc086328ca6659e72d11ffd4309ce4de22/vllm/model_executor/models/deepseek_v2.py
# https://github.com/vllm-project/vllm/blob/fb6af8bc086328ca6659e72d11ffd4309ce4de22/vllm/model_executor/models/deepseek_v2.py
"""Inference-only DeepseekV2 model."""
"""Inference-only DeepseekV2 model."""
from
typing
import
Any
,
Dict
,
Iterable
,
Optional
,
Tuple
from
typing
import
Any
,
Dict
,
Iterable
,
Optional
,
Tuple
import
torch
import
torch
...
...
python/sglang/srt/models/exaone.py
View file @
62a4a339
"""
# Copyright 2024 The LGcns AI Engineering Team
Copyright 2024 The LGcns AI Engineering Team
# Copyright 2023-2024 SGLang Team
Copyright 2023-2024 SGLang Team
# Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
# limitations under the License.
limitations under the License.
# ==============================================================================
"""
# Adapted from llama2.py
# Adapted from llama2.py
"""Inference-only Exaone model compatible with HuggingFace weights."""
"""Inference-only Exaone model compatible with HuggingFace weights."""
...
...
python/sglang/srt/models/gemma.py
View file @
62a4a339
"""
# Copyright 2023-2024 SGLang Team
Copyright 2023-2024 SGLang Team
# Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
# limitations under the License.
limitations under the License.
# ==============================================================================
"""
# Adapted from:
# Adapted from:
# https://github.com/vllm-project/vllm/blob/c7f2cf2b7f67bce5842fedfdba508440fe257375/vllm/model_executor/models/gemma.py#L1
# https://github.com/vllm-project/vllm/blob/c7f2cf2b7f67bce5842fedfdba508440fe257375/vllm/model_executor/models/gemma.py#L1
"""Inference-only Gemma model compatible with HuggingFace weights."""
"""Inference-only Gemma model compatible with HuggingFace weights."""
from
typing
import
Iterable
,
Optional
,
Tuple
from
typing
import
Iterable
,
Optional
,
Tuple
import
torch
import
torch
...
...
python/sglang/srt/models/gemma2.py
View file @
62a4a339
"""
# Copyright 2023-2024 SGLang Team
Copyright 2023-2024 SGLang Team
# Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
# limitations under the License.
limitations under the License.
# ==============================================================================
"""
# Adapted from:
# Adapted from:
# https://github.com/vllm-project/vllm/blob/56b325e977435af744f8b3dca7af0ca209663558/vllm/model_executor/models/gemma2.py
# https://github.com/vllm-project/vllm/blob/56b325e977435af744f8b3dca7af0ca209663558/vllm/model_executor/models/gemma2.py
from
typing
import
Iterable
,
Optional
,
Set
,
Tuple
,
Union
from
typing
import
Iterable
,
Optional
,
Set
,
Tuple
,
Union
import
torch
import
torch
...
...
python/sglang/srt/models/gemma2_reward.py
View file @
62a4a339
"""
# Copyright 2023-2024 SGLang Team
Copyright 2023-2024 SGLang Team
# Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
# limitations under the License.
limitations under the License.
# ==============================================================================
"""
from
typing
import
Iterable
,
Optional
,
Tuple
from
typing
import
Iterable
,
Optional
,
Tuple
...
...
python/sglang/srt/models/gpt_bigcode.py
View file @
62a4a339
"""
# Copyright 2023-2024 SGLang Team
Copyright 2023-2024 SGLang Team
# Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
# limitations under the License.
limitations under the License.
# ==============================================================================
"""
# Adapted from:
# Adapted from:
# https://github.com/vllm-project/vllm/blob/07eb6f19f3b0ee9f7adf6eb689607028aa40bfd5/vllm/model_executor/models/gpt_bigcode.py
# https://github.com/vllm-project/vllm/blob/07eb6f19f3b0ee9f7adf6eb689607028aa40bfd5/vllm/model_executor/models/gpt_bigcode.py
"""Inference-only GPTBigCode model compatible with HuggingFace weights."""
"""Inference-only GPTBigCode model compatible with HuggingFace weights."""
from
typing
import
Iterable
,
Optional
,
Tuple
from
typing
import
Iterable
,
Optional
,
Tuple
import
torch
import
torch
...
...
python/sglang/srt/models/grok.py
View file @
62a4a339
"""
# Copyright 2023-2024 SGLang Team
Copyright 2023-2024 SGLang Team
# Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
# limitations under the License.
limitations under the License.
# ==============================================================================
"""
# Adapted from
# Adapted from
# https://github.com/vllm-project/vllm/blob/c7f2cf2b7f67bce5842fedfdba508440fe257375/vllm/model_executor/models/mixtral.py#L1
# https://github.com/vllm-project/vllm/blob/c7f2cf2b7f67bce5842fedfdba508440fe257375/vllm/model_executor/models/mixtral.py#L1
"""Inference-only Grok1 model."""
"""Inference-only Grok1 model."""
import
warnings
import
warnings
from
typing
import
Iterable
,
List
,
Optional
,
Tuple
from
typing
import
Iterable
,
List
,
Optional
,
Tuple
...
...
python/sglang/srt/models/internlm2.py
View file @
62a4a339
"""
# Copyright 2023-2024 SGLang Team
Copyright 2023-2024 SGLang Team
# Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
"""
# -*- coding: utf-8 -*-
# Adapted from https://raw.githubusercontent.com/vllm-project/vllm/7f62077af5159c625fe3ad1c812e6c1a2b93ba3b/vllm/model_executor/models/internlm2.py
# Adapted from https://raw.githubusercontent.com/vllm-project/vllm/7f62077af5159c625fe3ad1c812e6c1a2b93ba3b/vllm/model_executor/models/internlm2.py
from
typing
import
Any
,
Dict
,
Iterable
,
Optional
,
Tuple
from
typing
import
Any
,
Dict
,
Iterable
,
Optional
,
Tuple
...
...
python/sglang/srt/models/internlm2_reward.py
View file @
62a4a339
"""
# Copyright 2023-2024 SGLang Team
Copyright 2023-2024 SGLang Team
# Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
# limitations under the License.
limitations under the License.
# ==============================================================================
"""
from
typing
import
Iterable
,
Optional
,
Tuple
from
typing
import
Iterable
,
Optional
,
Tuple
...
...
python/sglang/srt/models/llama.py
View file @
62a4a339
"""
# Copyright 2023-2024 SGLang Team
Copyright 2023-2024 SGLang Team
# Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
# limitations under the License.
limitations under the License.
# ==============================================================================
"""
# Adapted from
# Adapted from
# https://github.com/vllm-project/vllm/blob/c7f2cf2b7f67bce5842fedfdba508440fe257375/vllm/model_executor/models/llama.py#L1
# https://github.com/vllm-project/vllm/blob/c7f2cf2b7f67bce5842fedfdba508440fe257375/vllm/model_executor/models/llama.py#L1
...
...
python/sglang/srt/models/llama_classification.py
View file @
62a4a339
"""
# Copyright 2023-2024 SGLang Team
Copyright 2023-2024 SGLang Team
# Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
# limitations under the License.
limitations under the License.
# ==============================================================================
"""
from
typing
import
Iterable
,
Optional
,
Tuple
from
typing
import
Iterable
,
Optional
,
Tuple
...
...
python/sglang/srt/models/llama_reward.py
View file @
62a4a339
"""
# Copyright 2023-2024 SGLang Team
Copyright 2023-2024 SGLang Team
# Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
# limitations under the License.
limitations under the License.
# ==============================================================================
"""
from
typing
import
Iterable
,
Optional
,
Tuple
from
typing
import
Iterable
,
Optional
,
Tuple
...
...
python/sglang/srt/models/llava.py
View file @
62a4a339
"""
# Copyright 2023-2024 SGLang Team
Copyright 2023-2024 SGLang Team
# Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
# limitations under the License.
limitations under the License.
# ==============================================================================
"""
"""Inference-only LLaVa model compatible with HuggingFace weights."""
"""Inference-only LLaVa model compatible with HuggingFace weights."""
import
math
import
math
...
...
python/sglang/srt/models/llavavid.py
View file @
62a4a339
"""
# Copyright 2023-2024 SGLang Team
Copyright 2023-2024 SGLang Team
# Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
# limitations under the License.
limitations under the License.
# ==============================================================================
"""
"""Inference-only LLaVa video model compatible with HuggingFace weights."""
"""Inference-only LLaVa video model compatible with HuggingFace weights."""
from
typing
import
Iterable
,
List
,
Optional
,
Tuple
from
typing
import
Iterable
,
List
,
Optional
,
Tuple
...
...
python/sglang/srt/models/minicpm.py
View file @
62a4a339
"""
# Copyright 2023-2024 SGLang Team
Copyright 2023-2024 SGLang Team
# Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
# limitations under the License.
limitations under the License.
# ==============================================================================
"""
"""Inference-only MiniCPM model compatible with HuggingFace weights."""
"""Inference-only MiniCPM model compatible with HuggingFace weights."""
import
math
import
math
...
...
python/sglang/srt/models/minicpm3.py
View file @
62a4a339
"""
# Copyright 2023-2024 SGLang Team
Copyright 2023-2024 SGLang Team
# Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
# limitations under the License.
limitations under the License.
# ==============================================================================
"""
"""Inference-only MiniCPM3 model compatible with HuggingFace weights."""
"""Inference-only MiniCPM3 model compatible with HuggingFace weights."""
import
math
import
math
...
...
python/sglang/srt/models/mistral.py
View file @
62a4a339
"""
# Copyright 2023-2024 SGLang Team
Copyright 2023-2024 SGLang Team
# Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
# limitations under the License.
limitations under the License.
# ==============================================================================
"""
"""Inference-only Mistral model."""
"""Inference-only Mistral model."""
from
sglang.srt.models.llama
import
LlamaForCausalLM
from
sglang.srt.models.llama
import
LlamaForCausalLM
...
...
python/sglang/srt/models/mixtral.py
View file @
62a4a339
"""
# Copyright 2023-2024 SGLang Team
Copyright 2023-2024 SGLang Team
# Licensed under the Apache License, Version 2.0 (the "License");
Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
See the License for the specific language governing permissions and
# limitations under the License.
limitations under the License.
# ==============================================================================
"""
# Adapted from
# Adapted from
# https://github.com/vllm-project/vllm/blob/c7f2cf2b7f67bce5842fedfdba508440fe257375/vllm/model_executor/models/mixtral.py#L1
# https://github.com/vllm-project/vllm/blob/c7f2cf2b7f67bce5842fedfdba508440fe257375/vllm/model_executor/models/mixtral.py#L1
"""Inference-only Mixtral model."""
"""Inference-only Mixtral model."""
from
typing
import
Iterable
,
Optional
,
Tuple
from
typing
import
Iterable
,
Optional
,
Tuple
import
torch
import
torch
...
...
Prev
1
2
3
4
5
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment