Text Generation
Transformers
Safetensors
Italian
English
quark
causal-lm
bilingual
italian
english
small-language-model
trained-from-scratch
instruct
sft
chat
conversational
custom_code
Instructions to use ThingAI/Quark-270m-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ThingAI/Quark-270m-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ThingAI/Quark-270m-Instruct", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("ThingAI/Quark-270m-Instruct", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ThingAI/Quark-270m-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ThingAI/Quark-270m-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ThingAI/Quark-270m-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ThingAI/Quark-270m-Instruct
- SGLang
How to use ThingAI/Quark-270m-Instruct 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 "ThingAI/Quark-270m-Instruct" \ --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": "ThingAI/Quark-270m-Instruct", "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 "ThingAI/Quark-270m-Instruct" \ --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": "ThingAI/Quark-270m-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ThingAI/Quark-270m-Instruct with Docker Model Runner:
docker model run hf.co/ThingAI/Quark-270m-Instruct
Update README.md
Browse files
README.md
CHANGED
|
@@ -22,13 +22,6 @@ pipeline_tag: text-generation
|
|
| 22 |
# Quark-270M-Instruct — Bilingual Chat Model
|
| 23 |
Quark-270M-Instruct is the **instruction-tuned** version of [Quark-270M Base](https://huggingface.co/ThingAI/Quark-270m-Base), fine-tuned for conversational use in Italian and English. Built entirely from scratch by [ThingsAI](https://things-ai.org).
|
| 24 |
|
| 25 |
-
### Highlights
|
| 26 |
-
|
| 27 |
-
- 🇮🇹🇬🇧 **Bilingual:** Responds naturally in Italian and English
|
| 28 |
-
- 💬 **Conversational:** Greetings, Q&A, general knowledge
|
| 29 |
-
- 💻 **Code-aware:** Python basics and terminal commands
|
| 30 |
-
- 🪶 **Lightweight:** Runs on consumer GPUs (< 1GB VRAM in BF16)
|
| 31 |
-
|
| 32 |
## Quick Start
|
| 33 |
|
| 34 |
```python
|
|
@@ -131,24 +124,6 @@ Fine-tuned on a diverse mix of conversational and instructional data:
|
|
| 131 |
|
| 132 |
Quark-270M-Instruct powers [Things Chat](https://chat.things-ai.org) via a self-hosted FastAPI server with SSE streaming, conversation memory, web search, and content moderation.
|
| 133 |
|
| 134 |
-
```bash
|
| 135 |
-
QUARK_MODEL_DIR=./Quark-270m-Instruct python app.py
|
| 136 |
-
# → http://localhost:5005
|
| 137 |
-
```
|
| 138 |
-
|
| 139 |
-
### API
|
| 140 |
-
|
| 141 |
-
```bash
|
| 142 |
-
# Streaming
|
| 143 |
-
curl -X POST http://localhost:5005/api/chat/stream \
|
| 144 |
-
-H "Content-Type: application/json" \
|
| 145 |
-
-d '{"text": "Ciao!", "session_id": "user1"}'
|
| 146 |
-
|
| 147 |
-
# Batch
|
| 148 |
-
curl -X POST http://localhost:5005/api/chat \
|
| 149 |
-
-H "Content-Type: application/json" \
|
| 150 |
-
-d '{"text": "What is AI?"}'
|
| 151 |
-
```
|
| 152 |
|
| 153 |
## Limitations
|
| 154 |
|
|
|
|
| 22 |
# Quark-270M-Instruct — Bilingual Chat Model
|
| 23 |
Quark-270M-Instruct is the **instruction-tuned** version of [Quark-270M Base](https://huggingface.co/ThingAI/Quark-270m-Base), fine-tuned for conversational use in Italian and English. Built entirely from scratch by [ThingsAI](https://things-ai.org).
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
## Quick Start
|
| 26 |
|
| 27 |
```python
|
|
|
|
| 124 |
|
| 125 |
Quark-270M-Instruct powers [Things Chat](https://chat.things-ai.org) via a self-hosted FastAPI server with SSE streaming, conversation memory, web search, and content moderation.
|
| 126 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 127 |
|
| 128 |
## Limitations
|
| 129 |
|