Skip to content

Commit 7aeb7fa

Browse files
authored
Revert "[model] support vision language model llava. (#178)" (#262)
Let's revert the VLM related change for now to unblock release. cc: @liutongxuan - [ ] @guocuimi to create a branch for VLM development. This reverts commit 437be3f and d711c55.
1 parent c53d66d commit 7aeb7fa

33 files changed

+3
-2919
lines changed

python/tests/llava_test.py

Lines changed: 0 additions & 28 deletions
This file was deleted.

scalellm/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ pybind_extension(
99
csrc/sampling_params.cpp
1010
csrc/output.cpp
1111
csrc/llm_handler.cpp
12-
csrc/vlm_handler.cpp
1312
csrc/module.cpp
1413
DEPS
1514
:llm_handler

scalellm/_C/__init__.pyi

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ from scalellm._C.llm_handler import LLMHandler, Message, Priority
22
from scalellm._C.output import (LogProb, LogProbData, RequestOutput,
33
SequenceOutput, Status, StatusCode, Usage)
44
from scalellm._C.sampling_params import SamplingParams
5-
from scalellm._C.vlm_handler import VLMHandler
65

76
# Defined in scalellm/csrc/module.cpp
87
def get_metrics() -> str: ...
@@ -19,6 +18,5 @@ __all__ = [
1918
"StatusCode",
2019
"Usage",
2120
"LLMHandler",
22-
"VLMHandler",
2321
"get_metrics",
2422
]

scalellm/_C/vlm_handler.pyi

Lines changed: 0 additions & 47 deletions
This file was deleted.

scalellm/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
from scalellm._C import (LLMHandler, LogProb, LogProbData, Message, Priority,
1414
RequestOutput, SamplingParams, SequenceOutput, Status,
15-
StatusCode, Usage, VLMHandler, get_metrics)
15+
StatusCode, Usage, get_metrics)
1616
from scalellm.errors import ValidationError
1717
from scalellm.llm import LLM
1818
from scalellm.llm_engine import AsyncLLMEngine, OutputAsyncStream, OutputStream
@@ -34,6 +34,5 @@
3434
"StatusCode",
3535
"Usage",
3636
"LLMHandler",
37-
"VLMHandler",
3837
"get_metrics",
3938
]

scalellm/csrc/module.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ namespace py = pybind11;
1111
extern void init_sampling_params(py::module_& m);
1212
extern void init_output(py::module_& m);
1313
extern void init_llm_handler(py::module_& m);
14-
extern void init_vlm_handler(py::module_& m);
1514

1615
// NOLINTNEXTLINE
1716
static std::string get_metrics() { return Metrics::Instance().GetString(); }
@@ -27,7 +26,6 @@ PYBIND11_MODULE(PY_MODULE_NAME, m) {
2726
init_sampling_params(m);
2827
init_output(m);
2928
init_llm_handler(m);
30-
init_vlm_handler(m);
3129
}
3230

33-
} // namespace llm::csrc
31+
} // namespace llm::csrc

scalellm/csrc/vlm_handler.cpp

Lines changed: 0 additions & 100 deletions
This file was deleted.

scalellm/vlm.py

Lines changed: 0 additions & 127 deletions
This file was deleted.

src/engine/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,14 @@ cc_library(
1010
batch.h
1111
model_runner.h
1212
worker.h
13-
vlm_worker.h
1413
engine.h
1514
llm_engine.h
16-
vlm_engine.h
1715
SRCS
1816
utils.cpp
1917
batch.cpp
2018
model_runner.cpp
2119
worker.cpp
22-
vlm_worker.cpp
2320
llm_engine.cpp
24-
vlm_engine.cpp
2521
DEPS
2622
torch
2723
:common

src/engine/batch.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ void Batch::add(Sequence* sequence, uint32_t token_budget) {
4949
sequences_.push_back(sequence);
5050
token_budgets_.push_back(token_budget);
5151
budget_used_.push_back(0);
52-
53-
input_embedding_ = sequence->get_input_embedding();
5452
}
5553

5654
void Batch::add(const std::vector<Sequence*>& sequences) {
@@ -260,7 +258,6 @@ ModelInput Batch::prepare_model_input(uint32_t num_decoding_tokens,
260258

261259
pad_2d_vector(block_tables_vec, /*pad_value=*/0);
262260
input_params.block_tables = create_2d_tensor(block_tables_vec, torch::kInt);
263-
input_params.input_embedding = input_embedding_;
264261

265262
CHECK_EQ(sampling_params.size(), selected_token_idxes.size());
266263
if (!selected_token_idxes.empty()) {

0 commit comments

Comments
 (0)