Instructions to use dkalpakchi/SweCTRL-Mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dkalpakchi/SweCTRL-Mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="dkalpakchi/SweCTRL-Mini")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("dkalpakchi/SweCTRL-Mini") model = AutoModelForCausalLM.from_pretrained("dkalpakchi/SweCTRL-Mini") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use dkalpakchi/SweCTRL-Mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "dkalpakchi/SweCTRL-Mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "dkalpakchi/SweCTRL-Mini", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/dkalpakchi/SweCTRL-Mini
- SGLang
How to use dkalpakchi/SweCTRL-Mini 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 "dkalpakchi/SweCTRL-Mini" \ --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": "dkalpakchi/SweCTRL-Mini", "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 "dkalpakchi/SweCTRL-Mini" \ --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": "dkalpakchi/SweCTRL-Mini", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use dkalpakchi/SweCTRL-Mini with Docker Model Runner:
docker model run hf.co/dkalpakchi/SweCTRL-Mini
Commit ·
9a2d1e9
1
Parent(s): 69db0b3
Update README.md
Browse files
README.md
CHANGED
|
@@ -31,7 +31,7 @@ SweCTRL-Mini is a large Swedish language model that can be used for inference an
|
|
| 31 |
- **License:** BigScience Open RAIL-M
|
| 32 |
- **Finetuned from model:** None, trained from scratch
|
| 33 |
|
| 34 |
-
### Model Sources
|
| 35 |
|
| 36 |
<!-- Provide the basic links for the model. -->
|
| 37 |
|
|
@@ -95,12 +95,10 @@ The interface to partially mine training data is available at: https://swectrl.d
|
|
| 95 |
|
| 96 |
See Section 1 of the Technical note.
|
| 97 |
|
| 98 |
-
|
| 99 |
#### Training Hyperparameters
|
| 100 |
|
| 101 |
- **Training regime:** fp32
|
| 102 |
|
| 103 |
-
|
| 104 |
## Evaluation
|
| 105 |
|
| 106 |
See Sections 5.3, 6, and 7 in the associated paper, and Section 3 of the Technical note.
|
|
@@ -119,7 +117,7 @@ Carbon emissions can be estimated using the [Machine Learning Impact calculator]
|
|
| 119 |
## Technical Specifications
|
| 120 |
See Section 3 of the associated paper
|
| 121 |
|
| 122 |
-
## Citation
|
| 123 |
|
| 124 |
**BibTeX:**
|
| 125 |
```bibtex
|
|
|
|
| 31 |
- **License:** BigScience Open RAIL-M
|
| 32 |
- **Finetuned from model:** None, trained from scratch
|
| 33 |
|
| 34 |
+
### Model Sources
|
| 35 |
|
| 36 |
<!-- Provide the basic links for the model. -->
|
| 37 |
|
|
|
|
| 95 |
|
| 96 |
See Section 1 of the Technical note.
|
| 97 |
|
|
|
|
| 98 |
#### Training Hyperparameters
|
| 99 |
|
| 100 |
- **Training regime:** fp32
|
| 101 |
|
|
|
|
| 102 |
## Evaluation
|
| 103 |
|
| 104 |
See Sections 5.3, 6, and 7 in the associated paper, and Section 3 of the Technical note.
|
|
|
|
| 117 |
## Technical Specifications
|
| 118 |
See Section 3 of the associated paper
|
| 119 |
|
| 120 |
+
## Citation
|
| 121 |
|
| 122 |
**BibTeX:**
|
| 123 |
```bibtex
|