Instructions to use mpasila/Alpacazord-Viking-7B-exl2-4bpw with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mpasila/Alpacazord-Viking-7B-exl2-4bpw with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mpasila/Alpacazord-Viking-7B-exl2-4bpw")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mpasila/Alpacazord-Viking-7B-exl2-4bpw") model = AutoModelForCausalLM.from_pretrained("mpasila/Alpacazord-Viking-7B-exl2-4bpw", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mpasila/Alpacazord-Viking-7B-exl2-4bpw with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mpasila/Alpacazord-Viking-7B-exl2-4bpw" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mpasila/Alpacazord-Viking-7B-exl2-4bpw", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mpasila/Alpacazord-Viking-7B-exl2-4bpw
- SGLang
How to use mpasila/Alpacazord-Viking-7B-exl2-4bpw 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 "mpasila/Alpacazord-Viking-7B-exl2-4bpw" \ --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": "mpasila/Alpacazord-Viking-7B-exl2-4bpw", "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 "mpasila/Alpacazord-Viking-7B-exl2-4bpw" \ --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": "mpasila/Alpacazord-Viking-7B-exl2-4bpw", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mpasila/Alpacazord-Viking-7B-exl2-4bpw with Docker Model Runner:
docker model run hf.co/mpasila/Alpacazord-Viking-7B-exl2-4bpw
Update config.json
Browse files- config.json +0 -11
config.json
CHANGED
|
@@ -26,15 +26,4 @@
|
|
| 26 |
"untie_embeddings_and_output_weights": true,
|
| 27 |
"use_cache": true,
|
| 28 |
"vocab_size": 131072
|
| 29 |
-
"quantization_config": {
|
| 30 |
-
"quant_method": "exl2",
|
| 31 |
-
"version": "0.0.17",
|
| 32 |
-
"bits": 4.0,
|
| 33 |
-
"head_bits": 6,
|
| 34 |
-
"calibration": {
|
| 35 |
-
"rows": 100,
|
| 36 |
-
"length": 2048,
|
| 37 |
-
"dataset": "(default)"
|
| 38 |
-
}
|
| 39 |
-
}
|
| 40 |
}
|
|
|
|
| 26 |
"untie_embeddings_and_output_weights": true,
|
| 27 |
"use_cache": true,
|
| 28 |
"vocab_size": 131072
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
}
|