Instructions to use ServiceNow-AI/Apriel-H1-15b-Thinker-SFT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ServiceNow-AI/Apriel-H1-15b-Thinker-SFT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ServiceNow-AI/Apriel-H1-15b-Thinker-SFT", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("ServiceNow-AI/Apriel-H1-15b-Thinker-SFT", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ServiceNow-AI/Apriel-H1-15b-Thinker-SFT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ServiceNow-AI/Apriel-H1-15b-Thinker-SFT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ServiceNow-AI/Apriel-H1-15b-Thinker-SFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ServiceNow-AI/Apriel-H1-15b-Thinker-SFT
- SGLang
How to use ServiceNow-AI/Apriel-H1-15b-Thinker-SFT 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 "ServiceNow-AI/Apriel-H1-15b-Thinker-SFT" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ServiceNow-AI/Apriel-H1-15b-Thinker-SFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "ServiceNow-AI/Apriel-H1-15b-Thinker-SFT" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ServiceNow-AI/Apriel-H1-15b-Thinker-SFT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ServiceNow-AI/Apriel-H1-15b-Thinker-SFT with Docker Model Runner:
docker model run hf.co/ServiceNow-AI/Apriel-H1-15b-Thinker-SFT
Download config.json from ServiceNow-AI/Apriel-H1-15b-Thinker-SFT: direct link, hf CLI and curl.
- Browser
- Download file 1.71 kB
-
https://huggingface.co/ServiceNow-AI/Apriel-H1-15b-Thinker-SFT/resolve/main/config.json
- Command line
-
hf download hf://ServiceNow-AI/Apriel-H1-15b-Thinker-SFT/config.json
-
curl -L -o config.json https://huggingface.co/ServiceNow-AI/Apriel-H1-15b-Thinker-SFT/resolve/main/config.json
1.71 kB
| { | |
| "architectures": [ | |
| "AprielHForCausalLM" | |
| ], | |
| "attention_dropout": 0.0, | |
| "auto_map": { | |
| "AutoConfig": "configuration_apriel_h.AprielHConfig", | |
| "AutoModel": "modeling_apriel_h.AprielHModel", | |
| "AutoModelForCausalLM": "modeling_apriel_h.AprielHForCausalLM" | |
| }, | |
| "bos_token_id": 1, | |
| "eos_token_id": 2, | |
| "head_dim": 128, | |
| "hidden_act": "silu", | |
| "hidden_size": 5120, | |
| "hybrid_block_layout": [ | |
| "t", | |
| "t", | |
| "t", | |
| "m2", | |
| "t", | |
| "m2", | |
| "m2", | |
| "m2", | |
| "m2", | |
| "t", | |
| "t", | |
| "t", | |
| "t", | |
| "t", | |
| "t", | |
| "t", | |
| "t", | |
| "t", | |
| "t", | |
| "t", | |
| "m2", | |
| "m2", | |
| "m2", | |
| "m2", | |
| "m2", | |
| "m2", | |
| "t", | |
| "m2", | |
| "t", | |
| "t", | |
| "m2", | |
| "m2", | |
| "m2", | |
| "m2", | |
| "t", | |
| "m2", | |
| "m2", | |
| "m2", | |
| "m2", | |
| "m2", | |
| "m2", | |
| "m2", | |
| "m2", | |
| "m2", | |
| "m2", | |
| "m2", | |
| "m2", | |
| "m2", | |
| "t", | |
| "m2" | |
| ], | |
| "initializer_range": 0.02, | |
| "intermediate_size": 14336, | |
| "max_position_embeddings": 65536, | |
| "model_type": "apriel_h", | |
| "num_attention_heads": 32, | |
| "num_hidden_layers": 50, | |
| "num_key_value_heads": 8, | |
| "rms_norm_eps": 1e-05, | |
| "rope_scaling": { | |
| "rope_type": "default" | |
| }, | |
| "rope_theta": 1000000.0, | |
| "sliding_window": null, | |
| "ssm_cfg": { | |
| "activation": "silu", | |
| "bias": false, | |
| "chunk_size": 128, | |
| "conv_bias": true, | |
| "d_conv": 4, | |
| "d_inner": 4096, | |
| "d_state": 16, | |
| "d_xb": 1024, | |
| "dt_init": "random", | |
| "dt_init_floor": 0.0001, | |
| "dt_max": 0.1, | |
| "dt_min": 0.001, | |
| "dt_rank": 320, | |
| "dt_scale": 1.0, | |
| "expand": 1, | |
| "n_qk_heads": 32 | |
| }, | |
| "tie_word_embeddings": false, | |
| "transformers_version": "4.53.2", | |
| "use_cache": true, | |
| "vocab_size": 131072 | |
| } | |