Instructions to use faidrap/dclm-german-1b-it-v4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use faidrap/dclm-german-1b-it-v4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="faidrap/dclm-german-1b-it-v4")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("faidrap/dclm-german-1b-it-v4", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use faidrap/dclm-german-1b-it-v4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "faidrap/dclm-german-1b-it-v4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "faidrap/dclm-german-1b-it-v4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/faidrap/dclm-german-1b-it-v4
- SGLang
How to use faidrap/dclm-german-1b-it-v4 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 "faidrap/dclm-german-1b-it-v4" \ --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": "faidrap/dclm-german-1b-it-v4", "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 "faidrap/dclm-german-1b-it-v4" \ --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": "faidrap/dclm-german-1b-it-v4", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use faidrap/dclm-german-1b-it-v4 with Docker Model Runner:
docker model run hf.co/faidrap/dclm-german-1b-it-v4
| { | |
| "_name_or_path": "/data/horse/ws/fapa811h-dclm_german_1/fapa811h-dclm-de-1751065210/sft_logs/dclm-german-1b-v4", | |
| "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", | |
| "hidden_size": 2048, | |
| "model": "open_lm_1b_swiglutorch", | |
| "model_norm": "gain_only_lp_layer_norm", | |
| "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, | |
| "params": null, | |
| "positional_embedding_type": "rotary", | |
| "post_embed_norm": false, | |
| "qk_norm": true, | |
| "seq_len": 2048, | |
| "torch_dtype": "bfloat16", | |
| "transformers_version": "4.40.2", | |
| "use_cache": false, | |
| "vocab_size": 100277, | |
| "weight_tying": false | |
| } | |