Feature Extraction
Transformers
Safetensors
chest2vec
text-embeddings
retrieval
radiology
chest
qwen
custom_code
Instructions to use chest2vec/chest2vec_0.6B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use chest2vec/chest2vec_0.6B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="chest2vec/chest2vec_0.6B", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("chest2vec/chest2vec_0.6B", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
File size: 883 Bytes
9286661 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | """Configuration for Chest2Vec — a LoRA-tuned Qwen3-Embedding model for
chest radiology report embeddings.
Chest2Vec = Qwen3-Embedding base + contrastive LoRA adapter. It produces a
single L2-normalized report embedding (last-token / EOS pooling), matching the
Qwen3-Embedding convention.
"""
from transformers import PretrainedConfig
class Chest2VecConfig(PretrainedConfig):
model_type = "chest2vec"
def __init__(
self,
base_model: str = "Qwen/Qwen3-Embedding-0.6B",
adapter_subdir: str = "contrastive",
require_flash_attention_2: bool = True,
default_max_len: int = 512,
**kwargs,
):
self.base_model = base_model
self.adapter_subdir = adapter_subdir
self.require_flash_attention_2 = require_flash_attention_2
self.default_max_len = default_max_len
super().__init__(**kwargs)
|