Instructions to use mvasiliniuc/iva-codeint-swift-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mvasiliniuc/iva-codeint-swift-small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mvasiliniuc/iva-codeint-swift-small")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mvasiliniuc/iva-codeint-swift-small") model = AutoModelForCausalLM.from_pretrained("mvasiliniuc/iva-codeint-swift-small") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mvasiliniuc/iva-codeint-swift-small with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mvasiliniuc/iva-codeint-swift-small" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mvasiliniuc/iva-codeint-swift-small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mvasiliniuc/iva-codeint-swift-small
- SGLang
How to use mvasiliniuc/iva-codeint-swift-small 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 "mvasiliniuc/iva-codeint-swift-small" \ --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": "mvasiliniuc/iva-codeint-swift-small", "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 "mvasiliniuc/iva-codeint-swift-small" \ --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": "mvasiliniuc/iva-codeint-swift-small", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mvasiliniuc/iva-codeint-swift-small with Docker Model Runner:
docker model run hf.co/mvasiliniuc/iva-codeint-swift-small
Commit ·
33788bc
1
Parent(s): c1cab11
Add widgets for inference examples
Browse files
README.md
CHANGED
|
@@ -10,6 +10,15 @@ tags:
|
|
| 10 |
- swift
|
| 11 |
- mobile
|
| 12 |
- generation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
---
|
| 14 |
iva-codeint-swift-small GPT-2 is (small version - 239.4M parameters) trained from scratch to obtain results in the text-to-code task tailored for Swift language used
|
| 15 |
in native mobile development (iOS).
|
|
|
|
| 10 |
- swift
|
| 11 |
- mobile
|
| 12 |
- generation
|
| 13 |
+
widget:
|
| 14 |
+
- text: "/*\n A function that returns the time zone currently configured on the device.\n*/\n"
|
| 15 |
+
example_title: "Get the current time zone of the device"
|
| 16 |
+
- text: "/*\n A function that returns the current version of the operating system.\n*/\n"
|
| 17 |
+
example_title: "Get current device operating system"
|
| 18 |
+
- text: "/* \nA function that fires an NSNotification named 'MyUpdate'. \n*/\npublic func post"
|
| 19 |
+
example_title: "Post NSNotification"
|
| 20 |
+
- text: "/* \nA public function that saves a given String value in UserPreference at a given String key.\n*/\n"
|
| 21 |
+
example_title: "Save to UserPreference"
|
| 22 |
---
|
| 23 |
iva-codeint-swift-small GPT-2 is (small version - 239.4M parameters) trained from scratch to obtain results in the text-to-code task tailored for Swift language used
|
| 24 |
in native mobile development (iOS).
|