Text Generation
Transformers
Safetensors
llama_butler
feature-extraction
tokenbutler
sparse-attention
kv-cache
long-context
conversational
custom_code
Instructions to use Alwahsh/Meta-Llama-3.1-8B-Instruct-Butler with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Alwahsh/Meta-Llama-3.1-8B-Instruct-Butler with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Alwahsh/Meta-Llama-3.1-8B-Instruct-Butler", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Alwahsh/Meta-Llama-3.1-8B-Instruct-Butler", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Alwahsh/Meta-Llama-3.1-8B-Instruct-Butler with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Alwahsh/Meta-Llama-3.1-8B-Instruct-Butler" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Alwahsh/Meta-Llama-3.1-8B-Instruct-Butler", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Alwahsh/Meta-Llama-3.1-8B-Instruct-Butler
- SGLang
How to use Alwahsh/Meta-Llama-3.1-8B-Instruct-Butler 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 "Alwahsh/Meta-Llama-3.1-8B-Instruct-Butler" \ --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": "Alwahsh/Meta-Llama-3.1-8B-Instruct-Butler", "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 "Alwahsh/Meta-Llama-3.1-8B-Instruct-Butler" \ --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": "Alwahsh/Meta-Llama-3.1-8B-Instruct-Butler", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Alwahsh/Meta-Llama-3.1-8B-Instruct-Butler with Docker Model Runner:
docker model run hf.co/Alwahsh/Meta-Llama-3.1-8B-Instruct-Butler
Download config.json from Alwahsh/Meta-Llama-3.1-8B-Instruct-Butler: direct link, hf CLI and curl.
- Browser
- Download file 1.42 kB
-
https://huggingface.co/Alwahsh/Meta-Llama-3.1-8B-Instruct-Butler/resolve/main/config.json
- Command line
-
hf download hf://Alwahsh/Meta-Llama-3.1-8B-Instruct-Butler/config.json
-
curl -L -o config.json https://huggingface.co/Alwahsh/Meta-Llama-3.1-8B-Instruct-Butler/resolve/main/config.json
1.42 kB
| { | |
| "architectures": [ | |
| "LlamaButlerForCausalLM" | |
| ], | |
| "attention_bias": false, | |
| "attention_dropout": 0.0, | |
| "attn_reduce_factor": 8, | |
| "auto_map": { | |
| "AutoConfig": "modeling_llama_butler.LlamaButlerConfig", | |
| "AutoModel": "modeling_llama_butler.LlamaButlerForCausalLM", | |
| "AutoModelForCausalLM": "modeling_llama_butler.LlamaButlerForCausalLM" | |
| }, | |
| "bos_token_id": 128000, | |
| "dDash": 16, | |
| "eos_token_id": [ | |
| 128001, | |
| 128008, | |
| 128009 | |
| ], | |
| "eval_llm_mode": "ExpPred", | |
| "flash_attn": false, | |
| "head_attn_reduce_factor": 2, | |
| "head_dim": 128, | |
| "hidden_act": "silu", | |
| "hidden_size": 4096, | |
| "initializer_range": 0.02, | |
| "intdim": 512, | |
| "intermediate_size": 14336, | |
| "lookahead": 0, | |
| "max_position_embeddings": 131072, | |
| "min_sparse_index": 8, | |
| "mlp_bias": false, | |
| "model_type": "llama_butler", | |
| "num_attention_heads": 32, | |
| "num_hidden_layers": 32, | |
| "num_key_value_heads": 8, | |
| "pretraining_tp": 1, | |
| "producer_frequency": 4, | |
| "rms_norm_eps": 1e-05, | |
| "rope_scaling": { | |
| "factor": 8.0, | |
| "high_freq_factor": 4.0, | |
| "low_freq_factor": 1.0, | |
| "original_max_position_embeddings": 8192, | |
| "rope_type": "llama3" | |
| }, | |
| "rope_theta": 500000.0, | |
| "sliding_window": 128, | |
| "tie_word_embeddings": false, | |
| "token_sparse_method": "fixed_50pc", | |
| "torch_dtype": "bfloat16", | |
| "train_headpredictor": false, | |
| "transformers_version": "4.51.1", | |
| "use_cache": true, | |
| "vocab_size": 128256 | |
| } | |