Instructions to use keshav1354/CoderBuddy with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use keshav1354/CoderBuddy with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="keshav1354/CoderBuddy")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("keshav1354/CoderBuddy") model = AutoModelForCausalLM.from_pretrained("keshav1354/CoderBuddy", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use keshav1354/CoderBuddy with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "keshav1354/CoderBuddy" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "keshav1354/CoderBuddy", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/keshav1354/CoderBuddy
- SGLang
How to use keshav1354/CoderBuddy 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 "keshav1354/CoderBuddy" \ --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": "keshav1354/CoderBuddy", "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 "keshav1354/CoderBuddy" \ --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": "keshav1354/CoderBuddy", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use keshav1354/CoderBuddy with Docker Model Runner:
docker model run hf.co/keshav1354/CoderBuddy
update readme.md
Browse files
README.md
CHANGED
|
@@ -1,15 +1,27 @@
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
-
|
|
|
|
| 4 |
---
|
| 5 |
|
| 6 |
# Model Card for Model ID
|
| 7 |
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
## Model Details
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
### Model Description
|
| 15 |
|
|
@@ -17,13 +29,13 @@ tags: []
|
|
| 17 |
|
| 18 |
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
| 19 |
|
| 20 |
-
- **Developed by:**
|
| 21 |
- **Funded by [optional]:** [More Information Needed]
|
| 22 |
- **Shared by [optional]:** [More Information Needed]
|
| 23 |
- **Model type:** [More Information Needed]
|
| 24 |
- **Language(s) (NLP):** [More Information Needed]
|
| 25 |
- **License:** [More Information Needed]
|
| 26 |
-
- **Finetuned from model [optional]:**
|
| 27 |
|
| 28 |
### Model Sources [optional]
|
| 29 |
|
|
|
|
| 1 |
---
|
| 2 |
library_name: transformers
|
| 3 |
+
base_model:
|
| 4 |
+
- bigcode/starcoder2-7b
|
| 5 |
---
|
| 6 |
|
| 7 |
# Model Card for Model ID
|
| 8 |
|
| 9 |
+
# StarCoder2 Fine-Tuned with LoRA
|
| 10 |
+
|
| 11 |
+
This is a fine-tuned version of the StarCoder2 model using LoRA (Low-Rank Adaptation) on a specific dataset for code generation or a targeted task. The base model is `bigcode/starcoder2-7b`, and this model has been fine-tuned on the `CodeAlpaca_20K` python dataset.
|
| 12 |
+
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
## Model Details
|
| 17 |
+
**Base Model:** `bigcode/starcoder2-7b`
|
| 18 |
+
**Fine-Tuned With:** LoRA (Low-Rank Adaptation)
|
| 19 |
+
**Quantization:** 4-bit precision using `bitsandbytes`
|
| 20 |
+
**Fine-Tuning Framework:** Hugging Face `transformers` and `peft`
|
| 21 |
+
**Dataset:** CodeAlpaca_20K (or other dataset)
|
| 22 |
+
**Max Sequence Length:** 1024 tokens
|
| 23 |
+
**Use Case:** Code generation or Q&A for programming-related tasks.
|
| 24 |
+
**Model Size:** 7B parameters
|
| 25 |
|
| 26 |
### Model Description
|
| 27 |
|
|
|
|
| 29 |
|
| 30 |
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
| 31 |
|
| 32 |
+
- **Developed by:** Keshav Singh
|
| 33 |
- **Funded by [optional]:** [More Information Needed]
|
| 34 |
- **Shared by [optional]:** [More Information Needed]
|
| 35 |
- **Model type:** [More Information Needed]
|
| 36 |
- **Language(s) (NLP):** [More Information Needed]
|
| 37 |
- **License:** [More Information Needed]
|
| 38 |
+
- **Finetuned from model [optional]:** Starcoder2-7b
|
| 39 |
|
| 40 |
### Model Sources [optional]
|
| 41 |
|