Instructions to use drisspg/float8_dynamic_act_float8_weight-opt-125m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use drisspg/float8_dynamic_act_float8_weight-opt-125m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="drisspg/float8_dynamic_act_float8_weight-opt-125m")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("drisspg/float8_dynamic_act_float8_weight-opt-125m") model = AutoModelForCausalLM.from_pretrained("drisspg/float8_dynamic_act_float8_weight-opt-125m") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use drisspg/float8_dynamic_act_float8_weight-opt-125m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "drisspg/float8_dynamic_act_float8_weight-opt-125m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "drisspg/float8_dynamic_act_float8_weight-opt-125m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/drisspg/float8_dynamic_act_float8_weight-opt-125m
- SGLang
How to use drisspg/float8_dynamic_act_float8_weight-opt-125m 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 "drisspg/float8_dynamic_act_float8_weight-opt-125m" \ --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": "drisspg/float8_dynamic_act_float8_weight-opt-125m", "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 "drisspg/float8_dynamic_act_float8_weight-opt-125m" \ --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": "drisspg/float8_dynamic_act_float8_weight-opt-125m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use drisspg/float8_dynamic_act_float8_weight-opt-125m with Docker Model Runner:
docker model run hf.co/drisspg/float8_dynamic_act_float8_weight-opt-125m
Upload OPTForCausalLM
Browse files- config.json +27 -25
config.json
CHANGED
|
@@ -26,33 +26,35 @@
|
|
| 26 |
"modules_to_not_convert": null,
|
| 27 |
"quant_method": "torchao",
|
| 28 |
"quant_type": {
|
| 29 |
-
"
|
| 30 |
-
"
|
| 31 |
-
"
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
"
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
"
|
| 41 |
-
"
|
| 42 |
-
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
},
|
| 45 |
-
"
|
| 46 |
-
"
|
|
|
|
|
|
|
|
|
|
| 47 |
},
|
| 48 |
-
"
|
| 49 |
-
"
|
| 50 |
-
|
| 51 |
-
"_type": "torch.dtype"
|
| 52 |
-
}
|
| 53 |
-
},
|
| 54 |
-
"_type": "Float8DynamicActivationFloat8WeightConfig",
|
| 55 |
-
"_version": 1
|
| 56 |
},
|
| 57 |
"quant_type_kwargs": {}
|
| 58 |
},
|
|
|
|
| 26 |
"modules_to_not_convert": null,
|
| 27 |
"quant_method": "torchao",
|
| 28 |
"quant_type": {
|
| 29 |
+
"default": {
|
| 30 |
+
"_data": {
|
| 31 |
+
"activation_dtype": {
|
| 32 |
+
"_data": "float8_e4m3fn",
|
| 33 |
+
"_type": "torch.dtype"
|
| 34 |
+
},
|
| 35 |
+
"granularity": {
|
| 36 |
+
"_data": {},
|
| 37 |
+
"_type": "PerRow",
|
| 38 |
+
"_version": 1
|
| 39 |
+
},
|
| 40 |
+
"mm_config": {
|
| 41 |
+
"_data": {
|
| 42 |
+
"emulate": false,
|
| 43 |
+
"pad_inner_dim": false,
|
| 44 |
+
"use_fast_accum": true
|
| 45 |
+
},
|
| 46 |
+
"_type": "Float8MMConfig",
|
| 47 |
+
"_version": 1
|
| 48 |
},
|
| 49 |
+
"set_inductor_config": true,
|
| 50 |
+
"weight_dtype": {
|
| 51 |
+
"_data": "float8_e4m3fn",
|
| 52 |
+
"_type": "torch.dtype"
|
| 53 |
+
}
|
| 54 |
},
|
| 55 |
+
"_type": "Float8DynamicActivationFloat8WeightConfig",
|
| 56 |
+
"_version": 1
|
| 57 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 58 |
},
|
| 59 |
"quant_type_kwargs": {}
|
| 60 |
},
|