Instructions to use HanningZhang/Llama3.1-Math-PRM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HanningZhang/Llama3.1-Math-PRM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HanningZhang/Llama3.1-Math-PRM")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("HanningZhang/Llama3.1-Math-PRM") model = AutoModelForCausalLM.from_pretrained("HanningZhang/Llama3.1-Math-PRM") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use HanningZhang/Llama3.1-Math-PRM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HanningZhang/Llama3.1-Math-PRM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HanningZhang/Llama3.1-Math-PRM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/HanningZhang/Llama3.1-Math-PRM
- SGLang
How to use HanningZhang/Llama3.1-Math-PRM 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 "HanningZhang/Llama3.1-Math-PRM" \ --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": "HanningZhang/Llama3.1-Math-PRM", "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 "HanningZhang/Llama3.1-Math-PRM" \ --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": "HanningZhang/Llama3.1-Math-PRM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use HanningZhang/Llama3.1-Math-PRM with Docker Model Runner:
docker model run hf.co/HanningZhang/Llama3.1-Math-PRM
Upload LlamaForCausalLM
Browse files- config.json +2 -3
- generation_config.json +1 -1
- model-00001-of-00004.safetensors +1 -1
- model-00002-of-00004.safetensors +1 -1
- model-00003-of-00004.safetensors +1 -1
- model-00004-of-00004.safetensors +1 -1
config.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
|
@@ -7,7 +7,6 @@
|
|
| 7 |
"attention_dropout": 0.0,
|
| 8 |
"bos_token_id": 128000,
|
| 9 |
"eos_token_id": 128001,
|
| 10 |
-
"head_dim": 128,
|
| 11 |
"hidden_act": "silu",
|
| 12 |
"hidden_size": 4096,
|
| 13 |
"initializer_range": 0.02,
|
|
@@ -31,7 +30,7 @@
|
|
| 31 |
"rope_theta": 500000.0,
|
| 32 |
"tie_word_embeddings": false,
|
| 33 |
"torch_dtype": "bfloat16",
|
| 34 |
-
"transformers_version": "4.
|
| 35 |
"use_cache": true,
|
| 36 |
"vocab_size": 128256
|
| 37 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "average_prm",
|
| 3 |
"architectures": [
|
| 4 |
"LlamaForCausalLM"
|
| 5 |
],
|
|
|
|
| 7 |
"attention_dropout": 0.0,
|
| 8 |
"bos_token_id": 128000,
|
| 9 |
"eos_token_id": 128001,
|
|
|
|
| 10 |
"hidden_act": "silu",
|
| 11 |
"hidden_size": 4096,
|
| 12 |
"initializer_range": 0.02,
|
|
|
|
| 30 |
"rope_theta": 500000.0,
|
| 31 |
"tie_word_embeddings": false,
|
| 32 |
"torch_dtype": "bfloat16",
|
| 33 |
+
"transformers_version": "4.43.4",
|
| 34 |
"use_cache": true,
|
| 35 |
"vocab_size": 128256
|
| 36 |
}
|
generation_config.json
CHANGED
|
@@ -5,5 +5,5 @@
|
|
| 5 |
"eos_token_id": 128001,
|
| 6 |
"temperature": 0.6,
|
| 7 |
"top_p": 0.9,
|
| 8 |
-
"transformers_version": "4.
|
| 9 |
}
|
|
|
|
| 5 |
"eos_token_id": 128001,
|
| 6 |
"temperature": 0.6,
|
| 7 |
"top_p": 0.9,
|
| 8 |
+
"transformers_version": "4.43.4"
|
| 9 |
}
|
model-00001-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4976698672
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8b98c7455eef4b682dac149e953693d687bffc1d999e8acdf0982275f345a5ec
|
| 3 |
size 4976698672
|
model-00002-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4999802720
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b257827af51dca03764c2eae1b8645431402c710970c52aec4d300cf25fc1bde
|
| 3 |
size 4999802720
|
model-00003-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4915916176
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f4e2825b11b4f7dc5d721400a21e446c0ca21486e31d7ebcfd1f8d6a840a3001
|
| 3 |
size 4915916176
|
model-00004-of-00004.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1168138808
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f3fb5a79861cfe5cc79cc547307146057f61ccc5f4280a3cb2140258cd5cefbe
|
| 3 |
size 1168138808
|