Instructions to use Smilyai-labs/CodVa-1-Small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Smilyai-labs/CodVa-1-Small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Smilyai-labs/CodVa-1-Small", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Smilyai-labs/CodVa-1-Small", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Smilyai-labs/CodVa-1-Small with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Smilyai-labs/CodVa-1-Small" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Smilyai-labs/CodVa-1-Small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Smilyai-labs/CodVa-1-Small
- SGLang
How to use Smilyai-labs/CodVa-1-Small with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Smilyai-labs/CodVa-1-Small" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Smilyai-labs/CodVa-1-Small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Smilyai-labs/CodVa-1-Small" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Smilyai-labs/CodVa-1-Small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Smilyai-labs/CodVa-1-Small with Docker Model Runner:
docker model run hf.co/Smilyai-labs/CodVa-1-Small
File size: 871 Bytes
1d87ac7 ba05192 1d87ac7 4a65580 d0b38d8 ba05192 1d87ac7 ba05192 1d87ac7 ba05192 1d87ac7 ba05192 1d87ac7 | 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 28 29 30 31 32 33 34 35 36 37 | {
"model_type": "codva1",
"architectures": ["Codva1ForCausalLM"],
"auto_map": {
"AutoConfig": "configuration_codva1.CodVa1Config",
"AutoModelForCausalLM": "modeling_codva1.CodVa1ForCausalLM"
},
"vocab_size": 50304,
"d_model": 1536,
"n_layers": 28,
"n_heads": 24,
"n_kv_heads": 6,
"max_len": 2048,
"rope_theta": 5000000.0,
"ffn_hidden": 4096,
"use_moe": true,
"moe_experts": 16,
"moe_top_k": 2,
"moe_shared": 2,
"moe_hidden": 1024,
"moe_every": 2,
"moe_bias_speed": 0.001,
"use_qk_norm": true,
"use_structural_bias": true,
"n_struct_rel": 4,
"use_fim": true,
"fim_rate": 0.5,
"fim_pre_id": 50269,
"fim_suf_id": 50270,
"fim_mid_id": 50271,
"tie_word_embeddings": true,
"torch_dtype": "bfloat16",
"bos_token_id": 50256,
"eos_token_id": 50256,
"pad_token_id": 50256,
"transformers_version": "4.44.0"
} |