Instructions to use Lanni-ni/test with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Lanni-ni/test with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Lanni-ni/test", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Lanni-ni/test", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Lanni-ni/test with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Lanni-ni/test" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Lanni-ni/test", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Lanni-ni/test
- SGLang
How to use Lanni-ni/test 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 "Lanni-ni/test" \ --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": "Lanni-ni/test", "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 "Lanni-ni/test" \ --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": "Lanni-ni/test", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Lanni-ni/test with Docker Model Runner:
docker model run hf.co/Lanni-ni/test
File size: 1,098 Bytes
43169cf | 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 38 39 40 41 | {
"architectures": [
"DynamicSlidingWindowForCausalLM"
],
"attention_bias": false,
"auto_map": {
"AutoConfig": "configuration_dynamic_sliding_window.DynamicSlidingWindowConfig",
"AutoModelForCausalLM": "modeling_dynamic_sliding_window.DynamicSlidingWindowForCausalLM"
},
"bos_token_id": null,
"context_length": 512,
"elementwise_affine": true,
"eos_token_id": null,
"fuse_cross_entropy": true,
"fuse_norm": true,
"hidden_act": "swish",
"hidden_ratio": 4,
"hidden_size": 256,
"initializer_range": 0.02,
"intermediate_size": 1024,
"max_position_embeddings": null,
"model_type": "dynamic_sliding_window",
"norm_eps": 1e-06,
"num_heads": 4,
"num_hidden_layers": 2,
"num_kv_heads": null,
"qk_norm": false,
"qk_norm_share_param_across_head": false,
"torch_dtype": "float32",
"transformers_version": "4.44.0",
"use_cache": true,
"use_dynamic_window": true,
"use_k_shift": false,
"use_rope": false,
"use_v_shift": false,
"vocab_size": 50277,
"window_decay_rate": 0.6,
"window_initial_lambda": 1.0,
"window_num_epochs": 10
}
|