Text Generation
Transformers
Safetensors
qwen3
quantization
neural-compressor
qat
quantization-aware-training
conversational
text-generation-inference
Instructions to use Thomaschtl/test3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Thomaschtl/test3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Thomaschtl/test3") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("Thomaschtl/test3") model = AutoModelForMultimodalLM.from_pretrained("Thomaschtl/test3") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Thomaschtl/test3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Thomaschtl/test3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Thomaschtl/test3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Thomaschtl/test3
- SGLang
How to use Thomaschtl/test3 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 "Thomaschtl/test3" \ --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": "Thomaschtl/test3", "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 "Thomaschtl/test3" \ --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": "Thomaschtl/test3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Thomaschtl/test3 with Docker Model Runner:
docker model run hf.co/Thomaschtl/test3
| license: apache-2.0 | |
| base_model: Qwen/Qwen3-0.6B | |
| tags: | |
| - quantization | |
| - neural-compressor | |
| - qat | |
| - quantization-aware-training | |
| - qwen3 | |
| library_name: transformers | |
| pipeline_tag: text-generation | |
| # Qwen3-0.6B Quantized with QAT | |
| This model is a quantized version of `Qwen/Qwen3-0.6B` using **Quantization Aware Training (QAT)** with Intel Neural Compressor. | |
| ## π Model Details | |
| - **Base Model**: Qwen/Qwen3-0.6B | |
| - **Quantization Method**: Quantization Aware Training (QAT) | |
| - **Framework**: Intel Neural Compressor | |
| - **Model Size**: Significantly reduced from original | |
| - **Performance**: Maintains quality while improving efficiency | |
| ## π Benefits | |
| β **Smaller model size** - Reduced storage requirements | |
| β **Faster inference** - Optimized for deployment | |
| β **Lower memory usage** - More efficient resource utilization | |
| β **Maintained quality** - QAT preserves model performance | |
| ## π» Usage | |
| ```python | |
| from transformers import AutoModelForCausalLM, AutoTokenizer | |
| # Load the quantized model | |
| model = AutoModelForCausalLM.from_pretrained("Thomaschtl/qwen3-0.6b-qat-test") | |
| tokenizer = AutoTokenizer.from_pretrained("Thomaschtl/qwen3-0.6b-qat-test") | |
| # Generate text | |
| prompt = "The future of AI is" | |
| inputs = tokenizer(prompt, return_tensors="pt") | |
| outputs = model.generate(**inputs, max_length=100, do_sample=True, temperature=0.7) | |
| print(tokenizer.decode(outputs[0], skip_special_tokens=True)) | |
| ``` | |
| ## βοΈ Quantization Details | |
| - **Training Method**: Quantization Aware Training | |
| - **Optimizer**: AdamW | |
| - **Learning Rate**: 5e-5 | |
| - **Batch Size**: 2 | |
| - **Epochs**: 1 (demo configuration) | |
| ## π§ Technical Info | |
| This model was quantized using Intel Neural Compressor's QAT approach, which: | |
| 1. Simulates quantization during training | |
| 2. Allows model weights to adapt to quantization | |
| 3. Maintains better accuracy than post-training quantization | |
| ## π Citation | |
| If you use this model, please cite: | |
| ``` | |
| @misc{qwen3-qat, | |
| title={Qwen3-0.6B Quantized with QAT}, | |
| author={Thomaschtl}, | |
| year={2025}, | |
| publisher={Hugging Face}, | |
| url={https://huggingface.co/Thomaschtl/qwen3-0.6b-qat-test} | |
| } | |
| ``` | |
| ## βοΈ License | |
| This model follows the same license as the base model (Apache 2.0). | |