Feature Extraction
Transformers
Safetensors
qwen3_5
image-text-to-text
multimodal-embedding
retrieval
evaluation
custom_code
Instructions to use woooooz/WeMM-Embedding-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use woooooz/WeMM-Embedding-9B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="woooooz/WeMM-Embedding-9B", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("woooooz/WeMM-Embedding-9B", trust_remote_code=True) model = AutoModelForMultimodalLM.from_pretrained("woooooz/WeMM-Embedding-9B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download evaluation/vendor/transformers/models/codegen/configuration_codegen.py from woooooz/WeMM-Embedding-9B: direct link, hf CLI and curl.
- Browser
- Download file 2.65 kB
-
https://huggingface.co/woooooz/WeMM-Embedding-9B/resolve/main/evaluation/vendor/transformers/models/codegen/configuration_codegen.py
- Command line
-
hf download hf://woooooz/WeMM-Embedding-9B/evaluation/vendor/transformers/models/codegen/configuration_codegen.py
-
curl -L -o configuration_codegen.py https://huggingface.co/woooooz/WeMM-Embedding-9B/resolve/main/evaluation/vendor/transformers/models/codegen/configuration_codegen.py
2.65 kB
| # Copyright 2022 Salesforce authors, The EleutherAI, and HuggingFace Teams. All rights reserved. | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # 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. | |
| """CodeGen model configuration""" | |
| from huggingface_hub.dataclasses import strict | |
| from ...configuration_utils import PreTrainedConfig | |
| from ...utils import auto_docstring | |
| class CodeGenConfig(PreTrainedConfig): | |
| r""" | |
| n_ctx (`int`, *optional*, defaults to 2048): | |
| This attribute is used in `CodeGenModel.__init__` without any real effect. | |
| The dropout probability for all fully connected layers in the embeddings, encoder, and pooler. | |
| rotary_dim (`int`, *optional*, defaults to 64): | |
| Number of dimensions in the embedding that Rotary Position Embedding is applied to. | |
| n_inner (`int`, *optional*): | |
| Dimensionality of the inner feed-forward layers. `None` will set it to 4 times n_embd | |
| Example: | |
| ```python | |
| >>> from transformers import CodeGenConfig, CodeGenModel | |
| >>> # Initializing a CodeGen 6B configuration | |
| >>> configuration = CodeGenConfig() | |
| >>> # Initializing a model (with random weights) from the configuration | |
| >>> model = CodeGenModel(configuration) | |
| >>> # Accessing the model configuration | |
| >>> configuration = model.config | |
| ```""" | |
| model_type = "codegen" | |
| attribute_map = { | |
| "max_position_embeddings": "n_positions", | |
| "hidden_size": "n_embd", | |
| "num_attention_heads": "n_head", | |
| "num_hidden_layers": "n_layer", | |
| } | |
| vocab_size: int = 50400 | |
| n_positions: int = 2048 | |
| n_ctx: int = 2048 | |
| n_embd: int = 4096 | |
| n_layer: int = 28 | |
| n_head: int = 16 | |
| rotary_dim: int = 64 | |
| n_inner: int | None = None | |
| activation_function: str = "gelu_new" | |
| resid_pdrop: float | int = 0.0 | |
| embd_pdrop: float | int = 0.0 | |
| attn_pdrop: float | int = 0.0 | |
| layer_norm_epsilon: float = 1e-5 | |
| initializer_range: float = 0.02 | |
| use_cache: bool = True | |
| bos_token_id: int | None = 50256 | |
| eos_token_id: int | list[int] | None = 50256 | |
| tie_word_embeddings: bool = False | |
| __all__ = ["CodeGenConfig"] | |