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)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("aiplanet/panda-coder-13B") model = AutoModelForCausalLM.from_pretrained("aiplanet/panda-coder-13B", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- 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 ·
0cb5dd1
1
Parent(s): 3a263de
add citation
Browse files
README.md
CHANGED
|
@@ -41,29 +41,23 @@ You can schedule 1:1 meeting with our DevRel & Community Team to get started wit
|
|
| 41 |
Stay tuned for more updates and be a part of the coding evolution. Join us on this exciting journey as we make AI accessible to all at AI Planet!
|
| 42 |
|
| 43 |
|
| 44 |
-
## Training and evaluation data
|
| 45 |
-
|
| 46 |
-
More information needed
|
| 47 |
-
|
| 48 |
-
## Training procedure
|
| 49 |
-
|
| 50 |
-
### Training hyperparameters
|
| 51 |
-
|
| 52 |
-
The following hyperparameters were used during training:
|
| 53 |
-
- learning_rate: 0.001
|
| 54 |
-
- train_batch_size: 1
|
| 55 |
-
- eval_batch_size: 8
|
| 56 |
-
- seed: 42
|
| 57 |
-
- gradient_accumulation_steps: 8
|
| 58 |
-
- total_train_batch_size: 8
|
| 59 |
-
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 60 |
-
- lr_scheduler_type: constant
|
| 61 |
-
- lr_scheduler_warmup_ratio: 0.03
|
| 62 |
-
- training_steps: 512
|
| 63 |
-
|
| 64 |
### Framework versions
|
| 65 |
|
| 66 |
- Transformers 4.33.3
|
| 67 |
- Pytorch 2.0.1+cu118
|
| 68 |
- Datasets 2.14.5
|
| 69 |
- Tokenizers 0.13.3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
Stay tuned for more updates and be a part of the coding evolution. Join us on this exciting journey as we make AI accessible to all at AI Planet!
|
| 42 |
|
| 43 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
### Framework versions
|
| 45 |
|
| 46 |
- Transformers 4.33.3
|
| 47 |
- Pytorch 2.0.1+cu118
|
| 48 |
- Datasets 2.14.5
|
| 49 |
- Tokenizers 0.13.3
|
| 50 |
+
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
### Citation
|
| 54 |
+
|
| 55 |
+
```
|
| 56 |
+
@misc {lucifertrj,
|
| 57 |
+
author = { {Tarun Jain} },
|
| 58 |
+
title = { Panda Coder-13B by AI Planet},
|
| 59 |
+
year = 2023,
|
| 60 |
+
url = { https://huggingface.co/aiplanet/panda-coder-13B },
|
| 61 |
+
publisher = { Hugging Face }
|
| 62 |
+
}
|
| 63 |
+
```
|