Instructions to use WebOrganizer/LM-1b_1x-DCLMFasttext with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use WebOrganizer/LM-1b_1x-DCLMFasttext with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="WebOrganizer/LM-1b_1x-DCLMFasttext")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("WebOrganizer/LM-1b_1x-DCLMFasttext", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use WebOrganizer/LM-1b_1x-DCLMFasttext with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "WebOrganizer/LM-1b_1x-DCLMFasttext" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "WebOrganizer/LM-1b_1x-DCLMFasttext", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/WebOrganizer/LM-1b_1x-DCLMFasttext
- SGLang
How to use WebOrganizer/LM-1b_1x-DCLMFasttext 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 "WebOrganizer/LM-1b_1x-DCLMFasttext" \ --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": "WebOrganizer/LM-1b_1x-DCLMFasttext", "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 "WebOrganizer/LM-1b_1x-DCLMFasttext" \ --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": "WebOrganizer/LM-1b_1x-DCLMFasttext", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use WebOrganizer/LM-1b_1x-DCLMFasttext with Docker Model Runner:
docker model run hf.co/WebOrganizer/LM-1b_1x-DCLMFasttext
File size: 832 Bytes
fc4aea2 | 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 | {
"apply_qk_norm": true,
"architectures": [
"OpenLMForCausalLM"
],
"attn_activation": null,
"attn_name": "torch_attn",
"attn_seq_scalar": null,
"attn_seq_scalar_alpha": null,
"dim": 2048,
"ffn_type": "swiglu_torch",
"model": "open_lm_1b_swiglutorch",
"model_type": "openlm",
"moe_capacity_factor": 1.25,
"moe_expert_model_parallelism": false,
"moe_freq": 0,
"moe_loss_weight": 0.1,
"moe_num_experts": null,
"moe_top_k": 2,
"moe_weight_parallelism": false,
"n_heads": 16,
"n_layers": 24,
"norm_eps": 1e-05,
"norm_type": "gain_only_lp_layer_norm",
"params": null,
"positional_embedding_type": "rotary",
"post_embed_norm": false,
"qk_norm": true,
"seq_len": 2048,
"torch_dtype": "float32",
"transformers_version": "4.40.2",
"vocab_size": 50432,
"weight_tying": false
}
|