Instructions to use aiplanet/panda-coder-13B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aiplanet/panda-coder-13B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="aiplanet/panda-coder-13B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("aiplanet/panda-coder-13B") model = AutoModelForCausalLM.from_pretrained("aiplanet/panda-coder-13B") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use aiplanet/panda-coder-13B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aiplanet/panda-coder-13B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aiplanet/panda-coder-13B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/aiplanet/panda-coder-13B
- SGLang
How to use aiplanet/panda-coder-13B 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 "aiplanet/panda-coder-13B" \ --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": "aiplanet/panda-coder-13B", "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 "aiplanet/panda-coder-13B" \ --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": "aiplanet/panda-coder-13B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use aiplanet/panda-coder-13B with Docker Model Runner:
docker model run hf.co/aiplanet/panda-coder-13B
Commit ·
6d845fa
1
Parent(s): 3a263de
Adding Evaluation Results
Browse filesThis is an automated PR created with https://huggingface.co/spaces/Weyaxi/open-llm-leaderboard-results-pr
The purpose of this PR is to add evaluation results from the Open LLM Leaderboard to your model card.
If you encounter any issues, please report them to https://huggingface.co/spaces/Weyaxi/open-llm-leaderboard-results-pr/discussions
README.md
CHANGED
|
@@ -67,3 +67,17 @@ The following hyperparameters were used during training:
|
|
| 67 |
- Pytorch 2.0.1+cu118
|
| 68 |
- Datasets 2.14.5
|
| 69 |
- Tokenizers 0.13.3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 67 |
- Pytorch 2.0.1+cu118
|
| 68 |
- Datasets 2.14.5
|
| 69 |
- Tokenizers 0.13.3
|
| 70 |
+
|
| 71 |
+
# [Open LLM Leaderboard Evaluation Results](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
|
| 72 |
+
Detailed results can be found [here](https://huggingface.co/datasets/open-llm-leaderboard/details_aiplanet__panda-coder-13B)
|
| 73 |
+
|
| 74 |
+
| Metric | Value |
|
| 75 |
+
|-----------------------|---------------------------|
|
| 76 |
+
| Avg. | 17.2 |
|
| 77 |
+
| ARC (25-shot) | 22.7 |
|
| 78 |
+
| HellaSwag (10-shot) | 25.04 |
|
| 79 |
+
| MMLU (5-shot) | 23.12 |
|
| 80 |
+
| TruthfulQA (0-shot) | 0.0 |
|
| 81 |
+
| Winogrande (5-shot) | 49.57 |
|
| 82 |
+
| GSM8K (5-shot) | 0.0 |
|
| 83 |
+
| DROP (3-shot) | 0.0 |
|