Instructions to use sajal09/MNLP_M3_quantized_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sajal09/MNLP_M3_quantized_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sajal09/MNLP_M3_quantized_model")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sajal09/MNLP_M3_quantized_model") model = AutoModelForCausalLM.from_pretrained("sajal09/MNLP_M3_quantized_model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use sajal09/MNLP_M3_quantized_model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sajal09/MNLP_M3_quantized_model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sajal09/MNLP_M3_quantized_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/sajal09/MNLP_M3_quantized_model
- SGLang
How to use sajal09/MNLP_M3_quantized_model 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 "sajal09/MNLP_M3_quantized_model" \ --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": "sajal09/MNLP_M3_quantized_model", "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 "sajal09/MNLP_M3_quantized_model" \ --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": "sajal09/MNLP_M3_quantized_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use sajal09/MNLP_M3_quantized_model with Docker Model Runner:
docker model run hf.co/sajal09/MNLP_M3_quantized_model
Upload recipe.yaml
Browse files- recipe.yaml +12 -0
recipe.yaml
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
default_stage:
|
| 2 |
+
default_modifiers:
|
| 3 |
+
SmoothQuantModifier: {smoothing_strength: 0.7}
|
| 4 |
+
GPTQModifier:
|
| 5 |
+
config_groups:
|
| 6 |
+
group_0:
|
| 7 |
+
targets: [Linear]
|
| 8 |
+
weights: {num_bits: 4, type: int, symmetric: true, strategy: channel, dynamic: false,
|
| 9 |
+
observer: minmax}
|
| 10 |
+
input_activations: {num_bits: 8, type: int, symmetric: true, strategy: token, dynamic: true,
|
| 11 |
+
observer: null}
|
| 12 |
+
ignore: [lm_head]
|