Instructions to use FreedomIntelligence/Apollo-72B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use FreedomIntelligence/Apollo-72B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="FreedomIntelligence/Apollo-72B", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("FreedomIntelligence/Apollo-72B", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use FreedomIntelligence/Apollo-72B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "FreedomIntelligence/Apollo-72B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FreedomIntelligence/Apollo-72B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/FreedomIntelligence/Apollo-72B
- SGLang
How to use FreedomIntelligence/Apollo-72B 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 "FreedomIntelligence/Apollo-72B" \ --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": "FreedomIntelligence/Apollo-72B", "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 "FreedomIntelligence/Apollo-72B" \ --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": "FreedomIntelligence/Apollo-72B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use FreedomIntelligence/Apollo-72B with Docker Model Runner:
docker model run hf.co/FreedomIntelligence/Apollo-72B
Upload ./config.json with huggingface_hub
Browse files- config.json +43 -0
config.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "/sds_wangby/models/Qwen-72B",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"QWenLMHeadModel"
|
| 5 |
+
],
|
| 6 |
+
"attn_dropout_prob": 0.0,
|
| 7 |
+
"auto_map": {
|
| 8 |
+
"AutoConfig": "configuration_qwen.QWenConfig",
|
| 9 |
+
"AutoModelForCausalLM": "modeling_qwen.QWenLMHeadModel"
|
| 10 |
+
},
|
| 11 |
+
"bf16": true,
|
| 12 |
+
"emb_dropout_prob": 0.0,
|
| 13 |
+
"fp16": false,
|
| 14 |
+
"fp32": false,
|
| 15 |
+
"hidden_size": 8192,
|
| 16 |
+
"initializer_range": 0.02,
|
| 17 |
+
"intermediate_size": 49152,
|
| 18 |
+
"kv_channels": 128,
|
| 19 |
+
"layer_norm_epsilon": 1e-06,
|
| 20 |
+
"max_position_embeddings": 32768,
|
| 21 |
+
"model_type": "qwen",
|
| 22 |
+
"no_bias": true,
|
| 23 |
+
"num_attention_heads": 64,
|
| 24 |
+
"num_hidden_layers": 80,
|
| 25 |
+
"onnx_safe": null,
|
| 26 |
+
"rope_theta": 1000000,
|
| 27 |
+
"rotary_emb_base": 1000000,
|
| 28 |
+
"rotary_pct": 1.0,
|
| 29 |
+
"scale_attn_weights": true,
|
| 30 |
+
"seq_length": 32768,
|
| 31 |
+
"softmax_in_fp32": false,
|
| 32 |
+
"tie_word_embeddings": false,
|
| 33 |
+
"tokenizer_class": "QWenTokenizer",
|
| 34 |
+
"torch_dtype": "bfloat16",
|
| 35 |
+
"transformers_version": "4.35.2",
|
| 36 |
+
"use_cache": true,
|
| 37 |
+
"use_cache_kernel": false,
|
| 38 |
+
"use_cache_quantization": false,
|
| 39 |
+
"use_dynamic_ntk": false,
|
| 40 |
+
"use_flash_attn": true,
|
| 41 |
+
"use_logn_attn": false,
|
| 42 |
+
"vocab_size": 152064
|
| 43 |
+
}
|