Text Generation
Transformers
Safetensors
English
gemma-3
synthetic-data
textbooks
distillation
utility
summarization
lightning
conversational
Instructions to use TitleOS/Spark-270M-LoRA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TitleOS/Spark-270M-LoRA with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TitleOS/Spark-270M-LoRA") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("TitleOS/Spark-270M-LoRA", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use TitleOS/Spark-270M-LoRA with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TitleOS/Spark-270M-LoRA" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TitleOS/Spark-270M-LoRA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/TitleOS/Spark-270M-LoRA
- SGLang
How to use TitleOS/Spark-270M-LoRA 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 "TitleOS/Spark-270M-LoRA" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TitleOS/Spark-270M-LoRA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "TitleOS/Spark-270M-LoRA" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TitleOS/Spark-270M-LoRA", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use TitleOS/Spark-270M-LoRA with Docker Model Runner:
docker model run hf.co/TitleOS/Spark-270M-LoRA
Update README.md
Browse files
README.md
CHANGED
|
@@ -77,11 +77,15 @@ input_ids = tokenizer(input_text, return_tensors="pt").to("cuda")
|
|
| 77 |
|
| 78 |
outputs = model.generate(**input_ids, max_new_tokens=128)
|
| 79 |
print(tokenizer.d ecode(outputs[0]))
|
|
|
|
| 80 |
|
| 81 |
|
| 82 |
Quants:
|
| 83 |
|
| 84 |
Q4_K_M: https://huggingface.co/TitleOS/Spark-270M-FP16-Q4_K_M-GGUF
|
|
|
|
| 85 |
Q8: https://huggingface.co/TitleOS/Spark-270M-FP16-Q8_0-GGUF
|
|
|
|
| 86 |
FP16: https://huggingface.co/TitleOS/Spark-270M-FP16
|
|
|
|
| 87 |
Adaptor: https://huggingface.co/TitleOS/Spark-270M-LoRA
|
|
|
|
| 77 |
|
| 78 |
outputs = model.generate(**input_ids, max_new_tokens=128)
|
| 79 |
print(tokenizer.d ecode(outputs[0]))
|
| 80 |
+
```
|
| 81 |
|
| 82 |
|
| 83 |
Quants:
|
| 84 |
|
| 85 |
Q4_K_M: https://huggingface.co/TitleOS/Spark-270M-FP16-Q4_K_M-GGUF
|
| 86 |
+
|
| 87 |
Q8: https://huggingface.co/TitleOS/Spark-270M-FP16-Q8_0-GGUF
|
| 88 |
+
|
| 89 |
FP16: https://huggingface.co/TitleOS/Spark-270M-FP16
|
| 90 |
+
|
| 91 |
Adaptor: https://huggingface.co/TitleOS/Spark-270M-LoRA
|