Instructions to use GAOZIYUE/M2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GAOZIYUE/M2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GAOZIYUE/M2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("GAOZIYUE/M2") model = AutoModelForCausalLM.from_pretrained("GAOZIYUE/M2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use GAOZIYUE/M2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GAOZIYUE/M2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GAOZIYUE/M2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/GAOZIYUE/M2
- SGLang
How to use GAOZIYUE/M2 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 "GAOZIYUE/M2" \ --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": "GAOZIYUE/M2", "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 "GAOZIYUE/M2" \ --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": "GAOZIYUE/M2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use GAOZIYUE/M2 with Docker Model Runner:
docker model run hf.co/GAOZIYUE/M2
Upload model
Browse files- adapter_config.json +4 -4
adapter_config.json
CHANGED
|
@@ -24,13 +24,13 @@
|
|
| 24 |
"rank_pattern": {},
|
| 25 |
"revision": null,
|
| 26 |
"target_modules": [
|
|
|
|
|
|
|
|
|
|
| 27 |
"fc2",
|
| 28 |
-
"k_proj",
|
| 29 |
"lm_head",
|
| 30 |
-
"dense",
|
| 31 |
"q_proj",
|
| 32 |
-
"
|
| 33 |
-
"fc1"
|
| 34 |
],
|
| 35 |
"task_type": "CAUSAL_LM",
|
| 36 |
"trainable_token_indices": null,
|
|
|
|
| 24 |
"rank_pattern": {},
|
| 25 |
"revision": null,
|
| 26 |
"target_modules": [
|
| 27 |
+
"v_proj",
|
| 28 |
+
"dense",
|
| 29 |
+
"fc1",
|
| 30 |
"fc2",
|
|
|
|
| 31 |
"lm_head",
|
|
|
|
| 32 |
"q_proj",
|
| 33 |
+
"k_proj"
|
|
|
|
| 34 |
],
|
| 35 |
"task_type": "CAUSAL_LM",
|
| 36 |
"trainable_token_indices": null,
|