Text Generation
Transformers
Safetensors
English
qwen3
text-generation-inference
unsloth
conversational
4-bit precision
bitsandbytes
Instructions to use gmguarino/Qwen3-8B-unsloth-bnb-4bit-climateguard with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use gmguarino/Qwen3-8B-unsloth-bnb-4bit-climateguard with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="gmguarino/Qwen3-8B-unsloth-bnb-4bit-climateguard") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("gmguarino/Qwen3-8B-unsloth-bnb-4bit-climateguard") model = AutoModelForMultimodalLM.from_pretrained("gmguarino/Qwen3-8B-unsloth-bnb-4bit-climateguard") 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 gmguarino/Qwen3-8B-unsloth-bnb-4bit-climateguard with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "gmguarino/Qwen3-8B-unsloth-bnb-4bit-climateguard" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "gmguarino/Qwen3-8B-unsloth-bnb-4bit-climateguard", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/gmguarino/Qwen3-8B-unsloth-bnb-4bit-climateguard
- SGLang
How to use gmguarino/Qwen3-8B-unsloth-bnb-4bit-climateguard 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 "gmguarino/Qwen3-8B-unsloth-bnb-4bit-climateguard" \ --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": "gmguarino/Qwen3-8B-unsloth-bnb-4bit-climateguard", "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 "gmguarino/Qwen3-8B-unsloth-bnb-4bit-climateguard" \ --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": "gmguarino/Qwen3-8B-unsloth-bnb-4bit-climateguard", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio
How to use gmguarino/Qwen3-8B-unsloth-bnb-4bit-climateguard with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for gmguarino/Qwen3-8B-unsloth-bnb-4bit-climateguard to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for gmguarino/Qwen3-8B-unsloth-bnb-4bit-climateguard to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for gmguarino/Qwen3-8B-unsloth-bnb-4bit-climateguard to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="gmguarino/Qwen3-8B-unsloth-bnb-4bit-climateguard", max_seq_length=2048, ) - Docker Model Runner
How to use gmguarino/Qwen3-8B-unsloth-bnb-4bit-climateguard with Docker Model Runner:
docker model run hf.co/gmguarino/Qwen3-8B-unsloth-bnb-4bit-climateguard
File size: 2,310 Bytes
ce999eb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | {{- '<|im_start|>system\n' }}
{%- if messages[0]['role'] == 'system' %}
{{- messages[0]['content'] }}
{%- else %}
{{- 'You are Qwen, created by Alibaba Cloud. You have been fine tuned by Data For Good in order to classify misinformation on climate change in TV transcripts.\nYou power an AI assistant called Climate Safeguards, developped to this end.\nYour pretraining knowledge base was last updated on 2023-10-01, but have updated data until 2025-09-01 via fine tuning.\nThe current date is " + today_date + ".\n\n When you are unable to classify a transript you will, check to see if the misinformation statements have been contradicted or not. You will be focusing on non contradicted statements.\nYou follow these instructions in all languages, and always respond to the user in the language they use or request.\n Prompts may be in multiple languages, you will respond in the first language of the prompt.\nNext sections describe the capabilities that you have.\n\n# WEB BROWSING INSTRUCTIONS\n\nYou cannot perform any web search or access internet to open URLs, links etc. If it seems like the user is expecting you to do so, you clarify the situation and ask the user to copy paste the text directly in the chat.\n\n# MULTI-MODAL INSTRUCTIONS\n\nYou do not have the ability to read images, and you cannot generate images. You also cannot transcribe audio files or videos.\nYou cannot read nor transcribe audio files or videos.\n\n# OUTPUT STRUCTURE\n\nYou will always pay close attention to the desired output style of the prompt. If a prompt asks for JSON structure, do not add any markdown.\nIf a prompt asks you to answer with only a number or a single word, follow the instructions.' }}
{%- endif %}
{%- for message in messages %}
{%- if (message.role == "user") or (message.role == "system") %}
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
{%- elif message.role == "assistant" %}
{{- '<|im_start|>' + message.role + '<think>\n\n</think>\n\n' + message.content + '<|im_end|>' + '\n' }}
{%- endif %}
{%- endfor %}
{%- if add_generation_prompt %}
{{- '<|im_start|>assistant\n' }}
{%- if enable_thinking is defined and enable_thinking is false %}
{{- '<think>\n\n</think>\n\n' }}
{%- endif %}
{%- endif %} |