Instructions to use AdnanRiaz107/CodeBert-finetuned-the-stack-bash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AdnanRiaz107/CodeBert-finetuned-the-stack-bash with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AdnanRiaz107/CodeBert-finetuned-the-stack-bash")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AdnanRiaz107/CodeBert-finetuned-the-stack-bash") model = AutoModelForCausalLM.from_pretrained("AdnanRiaz107/CodeBert-finetuned-the-stack-bash") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use AdnanRiaz107/CodeBert-finetuned-the-stack-bash with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AdnanRiaz107/CodeBert-finetuned-the-stack-bash" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AdnanRiaz107/CodeBert-finetuned-the-stack-bash", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/AdnanRiaz107/CodeBert-finetuned-the-stack-bash
- SGLang
How to use AdnanRiaz107/CodeBert-finetuned-the-stack-bash 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 "AdnanRiaz107/CodeBert-finetuned-the-stack-bash" \ --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": "AdnanRiaz107/CodeBert-finetuned-the-stack-bash", "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 "AdnanRiaz107/CodeBert-finetuned-the-stack-bash" \ --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": "AdnanRiaz107/CodeBert-finetuned-the-stack-bash", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use AdnanRiaz107/CodeBert-finetuned-the-stack-bash with Docker Model Runner:
docker model run hf.co/AdnanRiaz107/CodeBert-finetuned-the-stack-bash
Commit ·
cf8bd43
1
Parent(s): 47f7beb
Training in progress, step 500
Browse files
adapter_config.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alpha_pattern": {},
|
| 3 |
+
"auto_mapping": null,
|
| 4 |
+
"base_model_name_or_path": "microsoft/codebert-base",
|
| 5 |
+
"bias": "none",
|
| 6 |
+
"fan_in_fan_out": false,
|
| 7 |
+
"inference_mode": true,
|
| 8 |
+
"init_lora_weights": true,
|
| 9 |
+
"layers_pattern": null,
|
| 10 |
+
"layers_to_transform": null,
|
| 11 |
+
"loftq_config": {},
|
| 12 |
+
"lora_alpha": 32,
|
| 13 |
+
"lora_dropout": 0.05,
|
| 14 |
+
"megatron_config": null,
|
| 15 |
+
"megatron_core": "megatron.core",
|
| 16 |
+
"modules_to_save": null,
|
| 17 |
+
"peft_type": "LORA",
|
| 18 |
+
"r": 16,
|
| 19 |
+
"rank_pattern": {},
|
| 20 |
+
"revision": null,
|
| 21 |
+
"target_modules": [
|
| 22 |
+
"query",
|
| 23 |
+
"key",
|
| 24 |
+
"value"
|
| 25 |
+
],
|
| 26 |
+
"task_type": "CAUSAL_LM"
|
| 27 |
+
}
|
adapter_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9655f476be427d798326b082fea3944d7993d0e63484c32b4109f0fc128875d9
|
| 3 |
+
size 3549272
|
runs/Dec06_14-17-17_2f8c0074e6bd/events.out.tfevents.1701872399.2f8c0074e6bd.175.0
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e48a8acecc408755a51fcdab5ca5495744789270c06c524d12293d84d6f2bb4b
|
| 3 |
+
size 12570
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dd876dc89c4c27419d13941bcaec5864b7039f38e4e95f22f5a267cae033801d
|
| 3 |
+
size 4728
|