Instructions to use mole-code/com.theokanning.openai-codegen-2B-mono-fft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mole-code/com.theokanning.openai-codegen-2B-mono-fft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mole-code/com.theokanning.openai-codegen-2B-mono-fft")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mole-code/com.theokanning.openai-codegen-2B-mono-fft") model = AutoModelForCausalLM.from_pretrained("mole-code/com.theokanning.openai-codegen-2B-mono-fft") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mole-code/com.theokanning.openai-codegen-2B-mono-fft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mole-code/com.theokanning.openai-codegen-2B-mono-fft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mole-code/com.theokanning.openai-codegen-2B-mono-fft", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mole-code/com.theokanning.openai-codegen-2B-mono-fft
- SGLang
How to use mole-code/com.theokanning.openai-codegen-2B-mono-fft 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 "mole-code/com.theokanning.openai-codegen-2B-mono-fft" \ --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": "mole-code/com.theokanning.openai-codegen-2B-mono-fft", "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 "mole-code/com.theokanning.openai-codegen-2B-mono-fft" \ --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": "mole-code/com.theokanning.openai-codegen-2B-mono-fft", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mole-code/com.theokanning.openai-codegen-2B-mono-fft with Docker Model Runner:
docker model run hf.co/mole-code/com.theokanning.openai-codegen-2B-mono-fft
Upload CodeGenForCausalLM
Browse files
model-00001-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4929343512
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ee7b9a251dda456d867b4f40029ef3382276f9a6dfad6ec1bff9a6f66f8ba696
|
| 3 |
size 4929343512
|
model-00002-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 4929436768
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:652df24186d1b11e54b1d4344dc630b2691069ae5dbfcd5a49e9de7799ca36e6
|
| 3 |
size 4929436768
|
model-00003-of-00003.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 1258672400
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8e63ce9411f2aa88bcbc2e4eb0a5cbf877ccbe442768a326c248b72345980512
|
| 3 |
size 1258672400
|