Instructions to use sharoz/codebert-python-custom-functions-dataset-python with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sharoz/codebert-python-custom-functions-dataset-python with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sharoz/codebert-python-custom-functions-dataset-python")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sharoz/codebert-python-custom-functions-dataset-python") model = AutoModelForCausalLM.from_pretrained("sharoz/codebert-python-custom-functions-dataset-python") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use sharoz/codebert-python-custom-functions-dataset-python with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sharoz/codebert-python-custom-functions-dataset-python" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sharoz/codebert-python-custom-functions-dataset-python", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/sharoz/codebert-python-custom-functions-dataset-python
- SGLang
How to use sharoz/codebert-python-custom-functions-dataset-python 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 "sharoz/codebert-python-custom-functions-dataset-python" \ --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": "sharoz/codebert-python-custom-functions-dataset-python", "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 "sharoz/codebert-python-custom-functions-dataset-python" \ --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": "sharoz/codebert-python-custom-functions-dataset-python", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use sharoz/codebert-python-custom-functions-dataset-python with Docker Model Runner:
docker model run hf.co/sharoz/codebert-python-custom-functions-dataset-python
update model card README.md
Browse files
README.md
CHANGED
|
@@ -13,7 +13,7 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 13 |
|
| 14 |
This model is a fine-tuned version of [neulab/codebert-python](https://huggingface.co/neulab/codebert-python) on the None dataset.
|
| 15 |
It achieves the following results on the evaluation set:
|
| 16 |
-
- Loss: 0.
|
| 17 |
|
| 18 |
## Model description
|
| 19 |
|
|
@@ -38,17 +38,22 @@ The following hyperparameters were used during training:
|
|
| 38 |
- seed: 42
|
| 39 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 40 |
- lr_scheduler_type: linear
|
| 41 |
-
- num_epochs:
|
| 42 |
|
| 43 |
### Training results
|
| 44 |
|
| 45 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 46 |
|:-------------:|:-----:|:----:|:---------------:|
|
| 47 |
-
|
|
| 48 |
-
|
|
| 49 |
-
|
|
| 50 |
-
|
|
| 51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 52 |
|
| 53 |
|
| 54 |
### Framework versions
|
|
|
|
| 13 |
|
| 14 |
This model is a fine-tuned version of [neulab/codebert-python](https://huggingface.co/neulab/codebert-python) on the None dataset.
|
| 15 |
It achieves the following results on the evaluation set:
|
| 16 |
+
- Loss: 0.0151
|
| 17 |
|
| 18 |
## Model description
|
| 19 |
|
|
|
|
| 38 |
- seed: 42
|
| 39 |
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 40 |
- lr_scheduler_type: linear
|
| 41 |
+
- num_epochs: 10
|
| 42 |
|
| 43 |
### Training results
|
| 44 |
|
| 45 |
| Training Loss | Epoch | Step | Validation Loss |
|
| 46 |
|:-------------:|:-----:|:----:|:---------------:|
|
| 47 |
+
| 1.9043 | 1.0 | 43 | 1.5089 |
|
| 48 |
+
| 0.5831 | 2.0 | 86 | 0.4039 |
|
| 49 |
+
| 0.3148 | 3.0 | 129 | 0.1510 |
|
| 50 |
+
| 0.2251 | 4.0 | 172 | 0.0710 |
|
| 51 |
+
| 0.0766 | 5.0 | 215 | 0.0442 |
|
| 52 |
+
| 0.0884 | 6.0 | 258 | 0.0287 |
|
| 53 |
+
| 0.0975 | 7.0 | 301 | 0.0210 |
|
| 54 |
+
| 0.1113 | 8.0 | 344 | 0.0183 |
|
| 55 |
+
| 0.0448 | 9.0 | 387 | 0.0162 |
|
| 56 |
+
| 0.029 | 10.0 | 430 | 0.0151 |
|
| 57 |
|
| 58 |
|
| 59 |
### Framework versions
|