Feature Extraction
Transformers
Safetensors
sentence-transformers
English
code
qwen2
text-generation
embeddings
retrieval
code-search
semantic-search
Eval Results (legacy)
text-embeddings-inference
Instructions to use faisalmumtaz/codecompass-embed with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use faisalmumtaz/codecompass-embed with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="faisalmumtaz/codecompass-embed")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("faisalmumtaz/codecompass-embed") model = AutoModelForCausalLM.from_pretrained("faisalmumtaz/codecompass-embed", device_map="auto") - sentence-transformers
How to use faisalmumtaz/codecompass-embed with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("faisalmumtaz/codecompass-embed") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
| { | |
| "architectures": [ | |
| "Qwen2ForCausalLM" | |
| ], | |
| "attention_dropout": 0.0, | |
| "bos_token_id": 151643, | |
| "dtype": "bfloat16", | |
| "embedding_dim": 896, | |
| "eos_token_id": 151643, | |
| "hidden_act": "silu", | |
| "hidden_size": 896, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 4864, | |
| "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" | |
| ], | |
| "max_position_embeddings": 32768, | |
| "max_seq_len": 512, | |
| "max_window_layers": 24, | |
| "model_name": "faisalmumtaz/codecompass-embed", | |
| "model_type": "qwen2", | |
| "normalize": true, | |
| "num_attention_heads": 14, | |
| "num_hidden_layers": 24, | |
| "num_key_value_heads": 2, | |
| "pooling": "mean", | |
| "rms_norm_eps": 1e-06, | |
| "rope_scaling": null, | |
| "rope_theta": 1000000.0, | |
| "sliding_window": null, | |
| "tie_word_embeddings": true, | |
| "transformers_version": "4.40.0", | |
| "use_cache": false, | |
| "use_lora": false, | |
| "use_sliding_window": false, | |
| "vocab_size": 151936, | |
| "torch_dtype": "bfloat16" | |
| } |