Text Generation
Transformers
Safetensors
qwen3_5_moe
image-text-to-text
autoround
int8
w8a16
Mixture of Experts
code
agent
conversational
8-bit precision
auto-round
Instructions to use Minachist/Ornith-1.0-35B-INT8-AutoRound with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Minachist/Ornith-1.0-35B-INT8-AutoRound with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Minachist/Ornith-1.0-35B-INT8-AutoRound") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("Minachist/Ornith-1.0-35B-INT8-AutoRound") model = AutoModelForMultimodalLM.from_pretrained("Minachist/Ornith-1.0-35B-INT8-AutoRound") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.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(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Minachist/Ornith-1.0-35B-INT8-AutoRound with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Minachist/Ornith-1.0-35B-INT8-AutoRound" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Minachist/Ornith-1.0-35B-INT8-AutoRound", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Minachist/Ornith-1.0-35B-INT8-AutoRound
- SGLang
How to use Minachist/Ornith-1.0-35B-INT8-AutoRound 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 "Minachist/Ornith-1.0-35B-INT8-AutoRound" \ --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": "Minachist/Ornith-1.0-35B-INT8-AutoRound", "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 "Minachist/Ornith-1.0-35B-INT8-AutoRound" \ --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": "Minachist/Ornith-1.0-35B-INT8-AutoRound", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Minachist/Ornith-1.0-35B-INT8-AutoRound with Docker Model Runner:
docker model run hf.co/Minachist/Ornith-1.0-35B-INT8-AutoRound
| import torch | |
| from transformers import AutoTokenizer | |
| from auto_round import AutoRound | |
| # You need to use datasets 3.6.0 since >=4.0 doesn't support codeparrot/github-code-clean dataset | |
| # You also need torchvision for some reason even if it's not used, otherwise it will throw an error "Unrecognized image processor ...". | |
| # TORCHVISION_AVAILABLE = False is there because datasets 3.6.0 uses the old torchvision api, and isn't compatible w/ this torchvision.'(And it will throw ImportError: cannot import name 'VideoReader' from 'torchvision.io') | |
| # Downgrading torchvision might solve the issue, but there's also a chance that doing that breaks other deps. Since I don't want to damage my brain anymore, I decided to just simply told datasets not to use torchvision. | |
| # To replicate the setup: | |
| # uv venv --python 3.13 .venv | |
| # source .venv/bin/activate | |
| # uv pip install "torch==2.12.1" "torchvision==0.27.1" \ | |
| # --index-url https://download.pytorch.org/whl/cu130 | |
| # uv pip install "transformers==5.12.1" "auto-round-nightly==0.14.0.dev20260625" \ | |
| # "accelerate==1.14.0" "datasets==3.6.0" "pillow" | |
| # This is why I don't like Python, it's dependency hell. | |
| import datasets | |
| datasets.config.TORCHVISION_AVAILABLE = False | |
| model_name_or_path = "." | |
| output_dir = "./Ornith-1.0-35B-INT8-AutoRound/" | |
| tokenizer = AutoTokenizer.from_pretrained(model_name_or_path, trust_remote_code=True) | |
| # auto-round doesn't support quantizing linear_attn, but I wanted to be sure. | |
| ignore_keywords = [ | |
| "embed_tokens", | |
| "linear_attn", | |
| "shared_expert", | |
| "mlp.gate", | |
| "visual", | |
| "lm_head", | |
| ] | |
| layer_config = {} | |
| for keyword in ignore_keywords: | |
| layer_config[keyword] = {"bits": 16} | |
| seqlen = 2048 | |
| nsamples = 1024 | |
| dataset = "NeelNanda/pile-10k:num=256,codeparrot/github-code-clean:num=768" | |
| ar = AutoRound( | |
| model=model_name_or_path, | |
| tokenizer=tokenizer, | |
| scheme="W8A16", | |
| enable_torch_compile=False, | |
| group_size=-1, | |
| sym=True, | |
| layer_config=layer_config, | |
| dataset=dataset, | |
| device_map="0,1", | |
| batch_size=8, | |
| seqlen=seqlen, | |
| iters=1000, | |
| nsamples=nsamples, | |
| low_gpu_mem_usage=True, | |
| ) | |
| ar.quantize_and_save(output_dir, format="auto_round") | |