Text Generation
Transformers
PyTorch
gpt2
Generated from Trainer
custom_code
text-generation-inference
Instructions to use flyover19/santacoder-finetuned-the-stack-bash with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use flyover19/santacoder-finetuned-the-stack-bash with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="flyover19/santacoder-finetuned-the-stack-bash", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("flyover19/santacoder-finetuned-the-stack-bash", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("flyover19/santacoder-finetuned-the-stack-bash", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use flyover19/santacoder-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 "flyover19/santacoder-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": "flyover19/santacoder-finetuned-the-stack-bash", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/flyover19/santacoder-finetuned-the-stack-bash
- SGLang
How to use flyover19/santacoder-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 "flyover19/santacoder-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": "flyover19/santacoder-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 "flyover19/santacoder-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": "flyover19/santacoder-finetuned-the-stack-bash", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use flyover19/santacoder-finetuned-the-stack-bash with Docker Model Runner:
docker model run hf.co/flyover19/santacoder-finetuned-the-stack-bash
Training in progress, step 500
Browse files- config.json +37 -0
- pytorch_model.bin +3 -0
- training_args.bin +3 -0
config.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "bigcode/santacoder",
|
| 3 |
+
"activation_function": "gelu_fast",
|
| 4 |
+
"architectures": [
|
| 5 |
+
"GPT2LMHeadCustomModel"
|
| 6 |
+
],
|
| 7 |
+
"attention_head_type": "multiquery",
|
| 8 |
+
"attn_pdrop": 0.1,
|
| 9 |
+
"auto_map": {
|
| 10 |
+
"AutoConfig": "bigcode/santacoder--configuration_gpt2_mq.GPT2CustomConfig",
|
| 11 |
+
"AutoModelForCausalLM": "bigcode/santacoder--modeling_gpt2_mq.GPT2LMHeadCustomModel"
|
| 12 |
+
},
|
| 13 |
+
"bos_token_id": 49152,
|
| 14 |
+
"embd_pdrop": 0.1,
|
| 15 |
+
"eos_token_id": 49152,
|
| 16 |
+
"initializer_range": 0.02,
|
| 17 |
+
"layer_norm_epsilon": 1e-05,
|
| 18 |
+
"model_type": "gpt2",
|
| 19 |
+
"n_embd": 2048,
|
| 20 |
+
"n_head": 16,
|
| 21 |
+
"n_inner": 8192,
|
| 22 |
+
"n_layer": 24,
|
| 23 |
+
"n_positions": 2048,
|
| 24 |
+
"reorder_and_upcast_attn": false,
|
| 25 |
+
"resid_pdrop": 0.1,
|
| 26 |
+
"scale_attn_by_inverse_layer_idx": false,
|
| 27 |
+
"scale_attn_weights": true,
|
| 28 |
+
"summary_activation": null,
|
| 29 |
+
"summary_first_dropout": 0.1,
|
| 30 |
+
"summary_proj_to_labels": true,
|
| 31 |
+
"summary_type": "cls_index",
|
| 32 |
+
"summary_use_proj": true,
|
| 33 |
+
"torch_dtype": "float32",
|
| 34 |
+
"transformers_version": "4.33.3",
|
| 35 |
+
"use_cache": true,
|
| 36 |
+
"vocab_size": 49280
|
| 37 |
+
}
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:164163187330c1845f1d27dd5076eaef54a0fb590ecf48480d635f5bbd4169ac
|
| 3 |
+
size 4600336581
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b948241580620f8588417194f7ee10bf34c1e0ac9739a24a53ac2c3b6dc09a2c
|
| 3 |
+
size 4091
|