Text Generation
Transformers
Safetensors
qwen2
llama-factory
Generated from Trainer
conversational
text-generation-inference
Instructions to use AQuarterMile/Writing-Model-Qwen-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AQuarterMile/Writing-Model-Qwen-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AQuarterMile/Writing-Model-Qwen-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AQuarterMile/Writing-Model-Qwen-7B") model = AutoModelForCausalLM.from_pretrained("AQuarterMile/Writing-Model-Qwen-7B", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use AQuarterMile/Writing-Model-Qwen-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AQuarterMile/Writing-Model-Qwen-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AQuarterMile/Writing-Model-Qwen-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AQuarterMile/Writing-Model-Qwen-7B
- SGLang
How to use AQuarterMile/Writing-Model-Qwen-7B 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 "AQuarterMile/Writing-Model-Qwen-7B" \ --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": "AQuarterMile/Writing-Model-Qwen-7B", "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 "AQuarterMile/Writing-Model-Qwen-7B" \ --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": "AQuarterMile/Writing-Model-Qwen-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AQuarterMile/Writing-Model-Qwen-7B with Docker Model Runner:
docker model run hf.co/AQuarterMile/Writing-Model-Qwen-7B
Commit History
-
Update README.md
Verified signature4f4e29b
-
Update README.md
Verified signature0e39a53 -
Correct pipeline tag to text-generation (#1)
Verified signature- Correct pipeline tag to text-generation (d07da402640ff4ab993222d0be84d0b9daa46ff2) Co-authored-by: Niels Rogge <nielsr@users.noreply.huggingface.co>f48048c
-
Update README.md
Verified signature7efbe34 -
Update README.md
Verified signatured7da7c5 -
Update README.md
Verified signature96a0f23 -
Upload special_tokens_map.json with huggingface_hub
Verified signature80249d8 -
Upload model-00004-of-00004.safetensors with huggingface_hub
Verified signature37ece17 -
Upload model-00003-of-00004.safetensors with huggingface_hub
Verified signature6066568 -
Upload model-00002-of-00004.safetensors with huggingface_hub
Verified signatureffb64d2 -
Upload model-00001-of-00004.safetensors with huggingface_hub
Verified signature7e40388 -
Upload LICENSE.txt with huggingface_hub
Verified signature0a6511d -
Upload vocab.json with huggingface_hub
Verified signature9c8834b -
Upload tokenizer.json with huggingface_hub
Verified signatureef37774 -
Upload tokenizer_config.json with huggingface_hub
Verified signaturea8269d6 -
Upload merges.txt with huggingface_hub
Verified signature2db7eee -
Upload model.safetensors.index.json with huggingface_hub
Verified signature1374a07 -
Upload generation_config.json with huggingface_hub
Verified signatureca652c2 -
Upload config.json with huggingface_hub
Verified signature1a60f11 -
Update README.md
Verified signature3f5f799 -
Upload model-00002-of-00004.safetensors with huggingface_hub
Verified signature6ea92d6 -
Upload model-00001-of-00004.safetensors with huggingface_hub
Verified signature25403c5 -
Upload LICENSE.txt with huggingface_hub
Verified signatured6f0c63 -
Upload README.md with huggingface_hub
Verified signature107c37a -
Upload vocab.json with huggingface_hub
Verified signature1bcdfa2 -
Upload tokenizer.json with huggingface_hub
Verified signaturebeb9979 -
Upload tokenizer_config.json with huggingface_hub
Verified signatureee917a6 -
Upload merges.txt with huggingface_hub
Verified signature074b490 -
Upload model.safetensors.index.json with huggingface_hub
Verified signature2646a61 -
Upload generation_config.json with huggingface_hub
Verified signature3168b72 -
Upload config.json with huggingface_hub
Verified signature07716b0 -
initial commit
Verified signature3b83b9c