Sentence Similarity
sentence-transformers
Safetensors
qwen3
feature-extraction
dense
Generated from Trainer
dataset_size:800
loss:ContrastiveLoss
text-embeddings-inference
Instructions to use TakalaWang/qwen3-embedding-4B-code-search with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use TakalaWang/qwen3-embedding-4B-code-search with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("TakalaWang/qwen3-embedding-4B-code-search") sentences = [ "Collects the tracing data from the given parameters.\n :param request: The Flask request.\n :param response: The flask response.\n :param error: The error occurred if any.\n :param latency: The time elapsed to process the request.\n :return: The tracing data.", "def enum_to_yaml(cls: Type[T_EnumToYAML], representer: Representer, data: T_EnumToYAML) -> ruamel.yaml.nodes.ScalarNode:\n \n return representer.represent_scalar(\n f\"!{cls.__name__}\",\n f\"{str(data)}\"\n )", "def subclasses(self, inherited=False):\n \n data = clips.data.DataObject(self._env)\n\n lib.EnvClassSubclasses(self._env, self._cls, data.byref, int(inherited))\n\n for klass in classes(self._env, data.value):\n yield klass", "def identify(self, req, resp, resource, uri_kwargs):\n \n header = req.get_header(, False)\n auth = header.split() if header else None\n\n if auth is None or auth[0].lower() != :\n return None\n\n if len(auth) != 2:\n raise HTTPBadRequest(\n \"Invalid Authorization header\",\n \"The Authorization header for Token auth should be in form:\\n\"\n \"Authorization: Token <token_value>\"\n )\n\n return auth[1]" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
| { | |
| "architectures": [ | |
| "Qwen3Model" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 151643, | |
| "dtype": "float16", | |
| "eos_token_id": 151645, | |
| "head_dim": 128, | |
| "hidden_act": "silu", | |
| "hidden_size": 2560, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 9728, | |
| "layer_types": [ | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention", | |
| "full_attention" | |
| ], | |
| "max_position_embeddings": 40960, | |
| "max_window_layers": 36, | |
| "model_type": "qwen3", | |
| "num_attention_heads": 32, | |
| "num_hidden_layers": 36, | |
| "num_key_value_heads": 8, | |
| "rms_norm_eps": 1e-06, | |
| "rope_scaling": null, | |
| "rope_theta": 1000000, | |
| "sliding_window": null, | |
| "tie_word_embeddings": true, | |
| "transformers_version": "4.56.2", | |
| "use_cache": true, | |
| "use_sliding_window": false, | |
| "vocab_size": 151665 | |
| } | |