Instructions to use mole-code/org.springframework.ai-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/org.springframework.ai-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/org.springframework.ai-codegen-2B-mono-fft")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mole-code/org.springframework.ai-codegen-2B-mono-fft") model = AutoModelForCausalLM.from_pretrained("mole-code/org.springframework.ai-codegen-2B-mono-fft") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mole-code/org.springframework.ai-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/org.springframework.ai-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/org.springframework.ai-codegen-2B-mono-fft", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mole-code/org.springframework.ai-codegen-2B-mono-fft
- SGLang
How to use mole-code/org.springframework.ai-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/org.springframework.ai-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/org.springframework.ai-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/org.springframework.ai-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/org.springframework.ai-codegen-2B-mono-fft", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mole-code/org.springframework.ai-codegen-2B-mono-fft with Docker Model Runner:
docker model run hf.co/mole-code/org.springframework.ai-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:05d788edb8011348dbc408b0fdbf2f2259c7465b1a3e4e2465a2d4395363f9d6
|
| 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:7a8c761c3c4ac7f77affcaac6e320c669daaa7f15ec9d77b76446cb4adc182da
|
| 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:8d64c4b9bf161af66c2e564c21b9fe020ca36b70bf0df14a0652309d971f8a29
|
| 3 |
size 1258672400
|