Fix the chat template for llava-v1.6-34b & format code (#177)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
"""Inference-only LLaVa model compatible with HuggingFace weights."""
|
||||
|
||||
from typing import List, Optional
|
||||
|
||||
import numpy as np
|
||||
@@ -269,7 +270,6 @@ class LlavaLlamaForCausalLM(nn.Module):
|
||||
raise ValueError(f"Unexpected select feature: {self.select_feature}")
|
||||
|
||||
# load mm_projector
|
||||
# TODO: support TP?
|
||||
projector_weights = {
|
||||
"model.mm_projector.0": "multi_modal_projector.linear_1",
|
||||
"model.mm_projector.2": "multi_modal_projector.linear_2",
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""Inference-only Mistral model."""
|
||||
|
||||
from sglang.srt.models.llama2 import LlamaForCausalLM
|
||||
|
||||
|
||||
|
||||
@@ -97,14 +97,16 @@ class MixtralMoE(nn.Module):
|
||||
|
||||
self.experts = nn.ModuleList(
|
||||
[
|
||||
MixtralMLP(
|
||||
self.num_total_experts,
|
||||
config.hidden_size,
|
||||
config.intermediate_size,
|
||||
linear_method=linear_method,
|
||||
(
|
||||
MixtralMLP(
|
||||
self.num_total_experts,
|
||||
config.hidden_size,
|
||||
config.intermediate_size,
|
||||
linear_method=linear_method,
|
||||
)
|
||||
if idx in self.expert_indicies
|
||||
else None
|
||||
)
|
||||
if idx in self.expert_indicies
|
||||
else None
|
||||
for idx in range(self.num_total_experts)
|
||||
]
|
||||
)
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"""Inference-only Yi-VL model."""
|
||||
|
||||
import os
|
||||
from typing import List, Optional
|
||||
|
||||
|
||||
Reference in New Issue
Block a user