Instructions to use sadiqj/camlcoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sadiqj/camlcoder with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sadiqj/camlcoder", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("sadiqj/camlcoder", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use sadiqj/camlcoder with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sadiqj/camlcoder" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sadiqj/camlcoder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/sadiqj/camlcoder
- SGLang
How to use sadiqj/camlcoder 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 "sadiqj/camlcoder" \ --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": "sadiqj/camlcoder", "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 "sadiqj/camlcoder" \ --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": "sadiqj/camlcoder", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use sadiqj/camlcoder with Docker Model Runner:
docker model run hf.co/sadiqj/camlcoder
| { | |
| "_name_or_path": "camlcoder", | |
| "alibi": true, | |
| "alibi_bias_max": 8, | |
| "architectures": [ | |
| "ReplitLM" | |
| ], | |
| "attn_clip_qkv": null, | |
| "attn_impl": "torch", | |
| "attn_pdrop": 0, | |
| "attn_qk_ln": false, | |
| "attn_uses_sequence_id": false, | |
| "auto_map": { | |
| "AutoConfig": "configuration_replit_lm.ReplitLMConfig", | |
| "AutoModelForCausalLM": "replit_lm.ReplitLM" | |
| }, | |
| "d_model": 2560, | |
| "emb_init_std": null, | |
| "emb_init_uniform_lim": null, | |
| "emb_pdrop": 0, | |
| "embedding_fraction": 1.0, | |
| "fan_mode": "fan_in", | |
| "init_device": "cpu", | |
| "init_div_is_residual": true, | |
| "init_gain": 0, | |
| "init_nonlinearity": "relu", | |
| "init_std": 0.02, | |
| "logit_scale": null, | |
| "low_precision_layernorm": true, | |
| "max_seq_len": 2048, | |
| "mlp_ratio": 4, | |
| "model_type": "replit_lm", | |
| "n_heads": 32, | |
| "n_layers": 32, | |
| "no_bias": true, | |
| "param_init_fn": "kaiming_normal_", | |
| "prefix_lm": false, | |
| "resid_pdrop": 0, | |
| "softmax_scale": null, | |
| "tokenizer_name": "replit/replit-code-v1-3b", | |
| "torch_dtype": "bfloat16", | |
| "transformers_version": "4.29.1", | |
| "use_cache": false, | |
| "verbose": 0, | |
| "vocab_size": 32768 | |
| } | |