Skip to content

Fix a bug in tying OPT embeddings#1

Merged
WoosukKwon merged 1 commit intomainfrom
fix-opt
Feb 25, 2023
Merged

Fix a bug in tying OPT embeddings#1
WoosukKwon merged 1 commit intomainfrom
fix-opt

Conversation

@WoosukKwon
Copy link
Copy Markdown
Collaborator

This PR fixes a bug in supporting OPT-350m/OPT-6.7b/OPT-13b and OPT-IML models.

The bug happened because our model code didn't include some methods that were required to tie the input and output embeddings.

@WoosukKwon WoosukKwon merged commit cbf8779 into main Feb 25, 2023
@WoosukKwon WoosukKwon deleted the fix-opt branch February 25, 2023 00:29
CZT0 referenced this pull request in semedia-tech/vllm Sep 11, 2023
orangetin referenced this pull request in togethercomputer/vllm-ttgi Sep 14, 2023
add rope scaling as a cli arg so openai server can load rope scaled models
xiangyuT pushed a commit to xiangyuT/vllm that referenced this pull request Oct 18, 2023
bigPYJ1151 referenced this pull request in bigPYJ1151/vllm Oct 30, 2023
Fix key cache block shape.
l1cacheDell pushed a commit to CaspianFang/vllm that referenced this pull request Nov 15, 2023
hongxiayang referenced this pull request in hongxiayang/vllm Feb 13, 2024
ilya-lavrenov referenced this pull request in ilya-lavrenov/vllm Feb 19, 2024
Deterministic OpenVINO inference
daniel-geon-park added a commit to gmlwns2000/vllm-timber that referenced this pull request Apr 15, 2024
mzusman pushed a commit to mzusman/vllm that referenced this pull request Apr 16, 2024
BA-78554: Jurassic 2.5

* worked on jurasic2.5 configuration file, updated jurassic2_5 modeling file to support alternating experts/attn layers

* finished working the forward pass of jurassic3.py

* finished working the forward pass of jurassic3.py

* finished working the forward pass of jurassic3.py

* jurassic_3 modeling file works, uses dummy weights initialized by "dummy" flag. Tokenizer raises issues, for now copying the mixtral tokenizer

* changed default tokenizer vocab values, loading of custom .pt weight files works.

* removed notebook

* merging master to jurassic-2.5 to reset head

* Merge branch 'master' into jurassic-2.5

* align to master

Approved-by: Tomer Asida
Approved-by: Mor Zusman
Bellk17 added a commit to Bellk17/vllm that referenced this pull request May 10, 2024
ykim362 referenced this pull request in ykim362/vllm Jun 17, 2024
Group Gemm Version
IWantFight pushed a commit to IWantFight/vllm that referenced this pull request Mar 10, 2026
starpit added a commit to starpit/vllm that referenced this pull request Mar 22, 2026
Fix vllm-project#1: Runtime instruction tensor fill
- Compile-time tensor is now a TEMPLATE (opcodes set, dimensions zero)
- Runtime code fills M/N/K and A/B/C pointers from function arguments
- DAG analysis resolves which params feed each GEMM's A/B/C inputs
- Intermediate buffers allocated/freed for inter-action data flow

Fix vllm-project#2: bar.sync deadlock
- GEMM pipeline emits bar.sync 0 expecting all 640 CTA threads
- Only 128 threads (4 consumer warps) run the GEMM handler
- Post-process replaces bar.sync 0 with bar.sync 1, 128 (scoped barrier)

Fix vllm-project#3: Shared memory collision (verified non-issue)
- Static smem (inst_state, mbarrier arrays) is separate from dynamic_smem
- GEMM cp.async buffers use dynamic_smem offset 0 — no collision
- Added compile-time assertions that GEMM smem fits in dynamic region
- Documented Phase 3 TODO for when pages carry inter-op data

314 tests pass (84 ferrite-macros + 218 ferrite-ptx + 12 ferrite-runtime).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Nick Mitchell <nickm@us.ibm.com>
saifmb0 added a commit to saifmb0/vllm that referenced this pull request Mar 29, 2026
…t#38472)

Add 17 unit tests covering the KV cache memory-management fixes from the
previous commit.  Tests run without NCCL, ZMQ, or CUDA by constructing a
minimal engine object via object.__new__ and stubbing the two compiled
extensions (vllm._C, vllm._C_stable_libtorch) in sys.modules.

Test classes
------------
TestRecvTensorPopsFromStore (4 tests)
  - entry_absent_after_recv_tensor          (regression guard vllm-project#1)
  - buffer_size_decremented_after_recv_tensor
  - multiple_layers_all_popped
  - recv_store_does_not_grow_under_sustained_load  (high-QPS OOM scenario)

TestRecvTensorPoolBackedEntries (4 tests)
  - pool_free_called_immediately             (regression guard vllm-project#2)
  - pool_entry_removed_from_recv_store
  - pool_free_not_called_for_none_tensor     (edge case: listener OOM path)
  - pool_free_called_once_per_entry_not_twice

TestGetFinishedStragglerCleanup (6 tests)
  - straggler_gpu_tensor_removed_and_buffer_decremented
  - straggler_pool_tensor_freed
  - multiple_straggler_layers_all_cleaned
  - only_finished_request_cleaned_not_others
  - noop_when_tensors_already_consumed
  - send/recv_tracking_dict_cleaned_by_get_finished

TestGetFinishedNoCompileLayersParamUnused (1 test)
  - Verifies straggler cleanup works even with no_compile_layers={}
    (the old iteration approach would silently skip all cleanup here)

TestPoolFreeCalledOnce (1 test)
  - combined_lifecycle_exactly_one_free: ensures pool.free is called
    exactly once across recv_tensor + get_finished, not twice.

Reproduction of original bugs confirmed:
  - Old recv_tensor (read without pop) leaves entry in recv_store: CONFIRMED
  - Old recv_tensor (no pool.free) leaks pinned RAM: CONFIRMED
  All 17 tests pass against the fixed code.

Co-authored-by: GitHub Copilot
saifmb0 added a commit to saifmb0/vllm that referenced this pull request Mar 29, 2026
…t#38472)

Add 17 unit tests covering the KV cache memory-management fixes from the
previous commit.  Tests run without NCCL, ZMQ, or CUDA by constructing a
minimal engine object via object.__new__ and stubbing the two compiled
extensions (vllm._C, vllm._C_stable_libtorch) in sys.modules.

Test classes
------------
TestRecvTensorPopsFromStore (4 tests)
  - entry_absent_after_recv_tensor          (regression guard vllm-project#1)
  - buffer_size_decremented_after_recv_tensor
  - multiple_layers_all_popped
  - recv_store_does_not_grow_under_sustained_load  (high-QPS OOM scenario)

TestRecvTensorPoolBackedEntries (4 tests)
  - pool_free_called_immediately             (regression guard vllm-project#2)
  - pool_entry_removed_from_recv_store
  - pool_free_not_called_for_none_tensor     (edge case: listener OOM path)
  - pool_free_called_once_per_entry_not_twice

TestGetFinishedStragglerCleanup (6 tests)
  - straggler_gpu_tensor_removed_and_buffer_decremented
  - straggler_pool_tensor_freed
  - multiple_straggler_layers_all_cleaned
  - only_finished_request_cleaned_not_others
  - noop_when_tensors_already_consumed
  - send/recv_tracking_dict_cleaned_by_get_finished

TestGetFinishedNoCompileLayersParamUnused (1 test)
  - Verifies straggler cleanup works even with no_compile_layers={}
    (the old iteration approach would silently skip all cleanup here)

TestPoolFreeCalledOnce (1 test)
  - combined_lifecycle_exactly_one_free: ensures pool.free is called
    exactly once across recv_tensor + get_finished, not twice.

Reproduction of original bugs confirmed:
  - Old recv_tensor (read without pop) leaves entry in recv_store: CONFIRMED
  - Old recv_tensor (no pool.free) leaks pinned RAM: CONFIRMED
  All 17 tests pass against the fixed code.

Co-authored-by: GitHub Copilot
Signed-off-by: saif <contact@saifmb.com>
Damon-Salvetore pushed a commit to Damon-Salvetore/vllm that referenced this pull request Mar 31, 2026
…n-files-overview

Add Chinese documentation for vLLM framework structure and GEMM call chains
anand-nv referenced this pull request in anand-nv/vllm Apr 1, 2026
[WIP] Fix Mamba state contamination in KV cache block reuse
jefp added a commit to jefp/vllm that referenced this pull request Apr 1, 2026
Rebase of PR vllm-project#33315 onto current main. Adds max_tokens_per_doc parameter
to rerank requests, matching Cohere and Jina rerank APIs. Documents
longer than this limit are truncated before scoring.

Handles all three cross-encoder code paths:
- Cross-encoder with sep token (tokenizer built-in truncation)
- Chat template / Jinja path (text truncation before template)
- Score template path (text truncation before template)

Also supports offline usage via PoolingParams(extra_kwargs={"max_tokens_per_doc": N}).

Addresses reviewer feedback from original PR:
- Offline support via PoolingParams (noooop vllm-project#1)
- Score template compatibility tests (noooop vllm-project#2)
- Tests across BAAI/bge-reranker-base, BAAI/bge-reranker-v2-gemma,
  and Qwen/Qwen3-Reranker-0.6B

Original PR: vllm-project#33315
Original author: hustxiayang

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
jefp added a commit to jefp/vllm that referenced this pull request Apr 1, 2026
Rebase of PR vllm-project#33315 onto current main. Adds max_tokens_per_doc parameter
to rerank requests, matching Cohere and Jina rerank APIs. Documents
longer than this limit are truncated before scoring.

Handles all three cross-encoder code paths:
- Cross-encoder with sep token (tokenizer built-in truncation)
- Chat template / Jinja path (text truncation before template)
- Score template path (text truncation before template)

Also supports offline usage via PoolingParams(extra_kwargs={"max_tokens_per_doc": N}).

Addresses reviewer feedback from original PR:
- Offline support via PoolingParams (noooop vllm-project#1)
- Score template compatibility tests (noooop vllm-project#2)
- Tests across BAAI/bge-reranker-base, BAAI/bge-reranker-v2-gemma,
  and Qwen/Qwen3-Reranker-0.6B

Original PR: vllm-project#33315
Original author: hustxiayang

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
jefp added a commit to jefp/vllm that referenced this pull request Apr 2, 2026
Rebase of PR vllm-project#33315 onto current main. Adds max_tokens_per_doc parameter
to rerank requests, matching Cohere and Jina rerank APIs. Documents
longer than this limit are truncated before scoring.

Handles all three cross-encoder code paths:
- Cross-encoder with sep token (tokenizer built-in truncation)
- Chat template / Jinja path (text truncation before template)
- Score template path (text truncation before template)

Also supports offline usage via PoolingParams(extra_kwargs={"max_tokens_per_doc": N}).

Addresses reviewer feedback from original PR:
- Offline support via PoolingParams (noooop vllm-project#1)
- Score template compatibility tests (noooop vllm-project#2)
- Tests across BAAI/bge-reranker-base, BAAI/bge-reranker-v2-gemma,
  and Qwen/Qwen3-Reranker-0.6B

Original PR: vllm-project#33315
Original author: hustxiayang

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
jefp added a commit to jefp/vllm that referenced this pull request Apr 2, 2026
Rebase of PR vllm-project#33315 onto current main. Adds max_tokens_per_doc parameter
to rerank requests, matching Cohere and Jina rerank APIs. Documents
longer than this limit are truncated before scoring.

Handles all three cross-encoder code paths:
- Cross-encoder with sep token (tokenizer built-in truncation)
- Chat template / Jinja path (text truncation before template)
- Score template path (text truncation before template)

Also supports offline usage via PoolingParams(extra_kwargs={"max_tokens_per_doc": N}).

Addresses reviewer feedback from original PR:
- Offline support via PoolingParams (noooop vllm-project#1)
- Score template compatibility tests (noooop vllm-project#2)
- Tests across BAAI/bge-reranker-base, BAAI/bge-reranker-v2-gemma,
  and Qwen/Qwen3-Reranker-0.6B

Original PR: vllm-project#33315
Original author: hustxiayang

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
jefp added a commit to jefp/vllm that referenced this pull request Apr 2, 2026
Rebase of PR vllm-project#33315 onto current main. Adds max_tokens_per_doc parameter
to rerank requests, matching Cohere and Jina rerank APIs. Documents
longer than this limit are truncated before scoring.

Handles all three cross-encoder code paths:
- Cross-encoder with sep token (tokenizer built-in truncation)
- Chat template / Jinja path (text truncation before template)
- Score template path (text truncation before template)

Also supports offline usage via PoolingParams(extra_kwargs={"max_tokens_per_doc": N}).

Addresses reviewer feedback from original PR:
- Offline support via PoolingParams (noooop vllm-project#1)
- Score template compatibility tests (noooop vllm-project#2)
- Tests across BAAI/bge-reranker-base, BAAI/bge-reranker-v2-gemma,
  and Qwen/Qwen3-Reranker-0.6B

Original PR: vllm-project#33315
Original author: hustxiayang

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Jesus Federico <jefp@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant