Text Generation
Transformers
Safetensors
code
English
anveshai_coderlm
causal-lm
anveshai
coderlm
mingru
differential-attention
multi-language
fim
edge
on-device
mobile
custom_code
Instructions to use AnveshAI/AnveshAI-CoderLM-0.1B-Preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AnveshAI/AnveshAI-CoderLM-0.1B-Preview with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AnveshAI/AnveshAI-CoderLM-0.1B-Preview", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("AnveshAI/AnveshAI-CoderLM-0.1B-Preview", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AnveshAI/AnveshAI-CoderLM-0.1B-Preview with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AnveshAI/AnveshAI-CoderLM-0.1B-Preview" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AnveshAI/AnveshAI-CoderLM-0.1B-Preview", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AnveshAI/AnveshAI-CoderLM-0.1B-Preview
- SGLang
How to use AnveshAI/AnveshAI-CoderLM-0.1B-Preview 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 "AnveshAI/AnveshAI-CoderLM-0.1B-Preview" \ --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": "AnveshAI/AnveshAI-CoderLM-0.1B-Preview", "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 "AnveshAI/AnveshAI-CoderLM-0.1B-Preview" \ --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": "AnveshAI/AnveshAI-CoderLM-0.1B-Preview", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use AnveshAI/AnveshAI-CoderLM-0.1B-Preview with Docker Model Runner:
docker model run hf.co/AnveshAI/AnveshAI-CoderLM-0.1B-Preview
Download config.json from AnveshAI/AnveshAI-CoderLM-0.1B-Preview: direct link, hf CLI and curl.
- Browser
- Download file 817 Bytes
-
https://huggingface.co/AnveshAI/AnveshAI-CoderLM-0.1B-Preview/resolve/main/config.json
- Command line
-
hf download hf://AnveshAI/AnveshAI-CoderLM-0.1B-Preview/config.json
-
curl -L -o config.json https://huggingface.co/AnveshAI/AnveshAI-CoderLM-0.1B-Preview/resolve/main/config.json
817 Bytes
| { | |
| "architectures": [ | |
| "AnveshAICoderLMForCausalLM" | |
| ], | |
| "auto_map": { | |
| "AutoConfig": "configuration_anveshai.AnveshAIConfig", | |
| "AutoModelForCausalLM": "modeling_anveshai.AnveshAICoderLMForCausalLM" | |
| }, | |
| "model_type": "anveshai_coderlm", | |
| "vocab_size": 16384, | |
| "d_model": 768, | |
| "hidden_size": 768, | |
| "n_layers": 15, | |
| "num_hidden_layers": 15, | |
| "n_q_heads": 8, | |
| "num_attention_heads": 8, | |
| "n_kv_heads": 2, | |
| "num_key_value_heads": 2, | |
| "head_dim": 64, | |
| "d_ff": 1808, | |
| "intermediate_size": 1808, | |
| "max_seq_len": 512, | |
| "max_position_embeddings": 512, | |
| "rms_eps": 1e-05, | |
| "eos_token_id": 0, | |
| "pad_token_id": 1, | |
| "bos_token_id": 0, | |
| "min_lang_token_id": 5, | |
| "max_lang_token_id": 17, | |
| "dtype": "float16", | |
| "torch_dtype": "float16", | |
| "use_cache": false, | |
| "transformers_version": "5.19.0" | |
| } | |