Text Generation
Transformers
Safetensors
metallm
custom-code
ml-engineering
specialist
metallum
custom_code
Instructions to use HomeBrewedLabs/metallum-1b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HomeBrewedLabs/metallum-1b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HomeBrewedLabs/metallum-1b", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("HomeBrewedLabs/metallum-1b", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use HomeBrewedLabs/metallum-1b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HomeBrewedLabs/metallum-1b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HomeBrewedLabs/metallum-1b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/HomeBrewedLabs/metallum-1b
- SGLang
How to use HomeBrewedLabs/metallum-1b 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 "HomeBrewedLabs/metallum-1b" \ --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": "HomeBrewedLabs/metallum-1b", "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 "HomeBrewedLabs/metallum-1b" \ --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": "HomeBrewedLabs/metallum-1b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use HomeBrewedLabs/metallum-1b with Docker Model Runner:
docker model run hf.co/HomeBrewedLabs/metallum-1b
| { | |
| "architectures": [ | |
| "MetaLLMForCausalLM" | |
| ], | |
| "attn_impl": "auto", | |
| "auto_map": { | |
| "AutoConfig": "configuration_metallm.MetaLLMConfig", | |
| "AutoModelForCausalLM": "modeling_metallm.MetaLLMForCausalLM" | |
| }, | |
| "bos_id": 1, | |
| "bos_token_id": 1, | |
| "d_ff": 4864, | |
| "d_model": 1792, | |
| "doc_mask": true, | |
| "hidden_size": 1792, | |
| "max_position_embeddings": 2048, | |
| "max_seq_len": 2048, | |
| "model_type": "metallm", | |
| "n_heads": 28, | |
| "n_kv_heads": 14, | |
| "n_layers": 26, | |
| "nope_every": 4, | |
| "norm_eps": 1e-05, | |
| "num_attention_heads": 28, | |
| "num_hidden_layers": 26, | |
| "num_key_value_heads": 14, | |
| "qk_norm": true, | |
| "rope_fp32": true, | |
| "rope_theta": 500000.0, | |
| "tie_embeddings": true, | |
| "transformers_version": "4.45.0", | |
| "vocab_size": 40000, | |
| "z_loss_weight": 0.0001 | |
| } | |