Instructions to use whynlp/pccot-llama1b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use whynlp/pccot-llama1b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="whynlp/pccot-llama1b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("whynlp/pccot-llama1b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use whynlp/pccot-llama1b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "whynlp/pccot-llama1b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "whynlp/pccot-llama1b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/whynlp/pccot-llama1b
- SGLang
How to use whynlp/pccot-llama1b 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 "whynlp/pccot-llama1b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "whynlp/pccot-llama1b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "whynlp/pccot-llama1b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "whynlp/pccot-llama1b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use whynlp/pccot-llama1b with Docker Model Runner:
docker model run hf.co/whynlp/pccot-llama1b
Update README.md
Browse files
README.md
CHANGED
|
@@ -93,8 +93,9 @@ Disclaimer: The weights of this model is not the original weights of the model t
|
|
| 93 |
|
| 94 |
The model is finetuned on the [GSM8K-AUG](https://huggingface.co/datasets/whyNLP/gsm8k-aug) dataset, achieving the following performance:
|
| 95 |
|
| 96 |
-
| Model
|
| 97 |
-
| ------------------------------- | -------------------- |
|
| 98 |
-
| CoT (llama1b)
|
| 99 |
-
| [PCCoT-gpt2](whynlp/pccot-gpt2)
|
| 100 |
-
|
|
|
|
|
|
|
| 93 |
|
| 94 |
The model is finetuned on the [GSM8K-AUG](https://huggingface.co/datasets/whyNLP/gsm8k-aug) dataset, achieving the following performance:
|
| 95 |
|
| 96 |
+
| Model | Accuracy |
|
| 97 |
+
| ------------------------------------------------------------ | -------------------- |
|
| 98 |
+
| CoT (llama1b) | 61.6 |
|
| 99 |
+
| [PCCoT-gpt2](https://huggingface.co/whynlp/pccot-gpt2) | 49.48 \\(\pm\\) 0.31 |
|
| 100 |
+
| [PCCoT-gpt2-nl](https://huggingface.co/whynlp/pccot-gpt2-nl) | 49.23 \\(\pm\\) 0.80 |
|
| 101 |
+
| **PCCoT-llama1b** | 53.35 \\(\pm\\) 0.18 |
|