Instructions to use jhghar/jh-qwen3-8b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jhghar/jh-qwen3-8b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jhghar/jh-qwen3-8b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jhghar/jh-qwen3-8b") model = AutoModelForCausalLM.from_pretrained("jhghar/jh-qwen3-8b", device_map="auto") 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 jhghar/jh-qwen3-8b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jhghar/jh-qwen3-8b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jhghar/jh-qwen3-8b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jhghar/jh-qwen3-8b
- SGLang
How to use jhghar/jh-qwen3-8b 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 "jhghar/jh-qwen3-8b" \ --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": "jhghar/jh-qwen3-8b", "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 "jhghar/jh-qwen3-8b" \ --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": "jhghar/jh-qwen3-8b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jhghar/jh-qwen3-8b with Docker Model Runner:
docker model run hf.co/jhghar/jh-qwen3-8b
JH-Qwen3-8B: LoRA-Tuned Qwen3-8B Model
This repository contains a fine-tuned version of Qwen/Qwen3-8B using LoRA (Low-Rank Adaptation). The model has been merged with its LoRA weights for easier deployment.
Model Details
- Base Model: Qwen/Qwen3-8B
- Architecture: qwen3
- Size: 8B parameters (8,190,735,360)
- Framework: PyTorch
- Task: text-generation
- License: Apache 2.0
Usage
You can use this model directly with the Hugging Face Transformers library:
from transformers import AutoModelForCausalLM, AutoTokenizer
# Load model and tokenizer
model_name = "jhghar/jh-qwen3-8b"
model = AutoModelForCausalLM.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
# Example usage
prompt = "Hello, how are you?"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_length=100)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
Model Architecture
This model uses the Qwen3 architecture, which is based on a transformer decoder-only model. The base model has been fine-tuned using LoRA and the weights have been merged for production use.
Files in this Repository
- Model weights split into 4 safetensors files
- Configuration files (config.json, tokenizer_config.json)
- Tokenizer files (tokenizer.json, vocab.json, merges.txt, added_tokens.json)
- Special tokens mapping
License
This model is licensed under the Apache License 2.0. Please see the LICENSE file for details.
Citation
If you use this model, please cite both the original Qwen3 model and this adaptation:
@misc{qwen3-8b,
author = {Qwen Team},
title = {Qwen3-8B Language Model},
year = {2024},
publisher = {Hugging Face},
journal = {Hugging Face repository},
howpublished = {\url{https://huggingface.co/Qwen/Qwen3-8B}}
}
- Downloads last month
- 19