Unverified Commit 62a4a339 authored by Xuehai Pan's avatar Xuehai Pan Committed by GitHub
Browse files

docs: fix module docstrings and copyright headers (#2077)

parent 2797bc34
""" # 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
......
""" # 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
......
""" # 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
......
""" # 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."""
......
""" # 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
......
""" # 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
......
""" # 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
......
""" # 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
......
""" # 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
......
""" # 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
......
""" # 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
......
""" # 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
......
""" # 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
......
""" # 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
......
""" # 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
......
""" # 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
......
""" # 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
......
""" # 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
......
""" # 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
......
""" # 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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment