Instructions to use jukofyork/command-a-03-2025-writer-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jukofyork/command-a-03-2025-writer-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jukofyork/command-a-03-2025-writer-v1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jukofyork/command-a-03-2025-writer-v1") model = AutoModelForCausalLM.from_pretrained("jukofyork/command-a-03-2025-writer-v1") 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 jukofyork/command-a-03-2025-writer-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jukofyork/command-a-03-2025-writer-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jukofyork/command-a-03-2025-writer-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jukofyork/command-a-03-2025-writer-v1
- SGLang
How to use jukofyork/command-a-03-2025-writer-v1 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 "jukofyork/command-a-03-2025-writer-v1" \ --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": "jukofyork/command-a-03-2025-writer-v1", "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 "jukofyork/command-a-03-2025-writer-v1" \ --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": "jukofyork/command-a-03-2025-writer-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jukofyork/command-a-03-2025-writer-v1 with Docker Model Runner:
docker model run hf.co/jukofyork/command-a-03-2025-writer-v1
NOTE: Read the Control Adapter documentation for implementation details.
Trained via qlora-pipe-lite:
# ==============================
# MODEL AND OUTPUT CONFIGURATION
# ==============================
model_dir = '/mnt/models/command-a-03-2025-uncut'
output_dir = '/mnt/fiction_finetunes/finetuned'
# ===========================
# TRAINING TYPE CONFIGURATION
# ===========================
use_control_adapters = true
load_in_4bit = true
# =============================
# CONTROL ADAPTER CONFIGURATION
# =============================
# ~20 tokens per trainable parameter (1e9/(64*64*(12288+1)))
lora_rank = 64
control_adapter_gamma = 0.1
# =======================
# OPTIMIZER CONFIGURATION
# =======================
lr = 1e-3
# ======================
# TRAINING CONFIGURATION
# ======================
sequence_len = 4096
pipeline_stages = 2
# 120 batch size (3*40) --> 480k tokens per step (4096*120)
gradient_accumulation_steps = 40
use_column_major_topology = true
# =====================
# DATASET CONFIGURATION
# =====================
sequence_prefix = 5 # "<BOS_TOKEN>"
document_prefix = [255000, 255007] # "<|START_OF_TURN_TOKEN|><|CHATBOT_TOKEN|>"
document_suffix = 255001 # "<|END_OF_TURN_TOKEN|>"
mask_tokens = true # Mask all special tokens
drop_tails = true
mix_datasets = true
# -------------------
# POSITIVE CLASS DATA
# -------------------
[[datasets]]
dataset_path = '/mnt/datasets/books-fiction-paragraphs/*.json'
control_class = 1
# -------------------
# NEGATIVE CLASS DATA
# -------------------
[[datasets]]
dataset_path = '/mnt/datasets/slop-fiction-paragraphs/*.json'
control_class = -1
using ~1B tokens (ie: ~500M positive and ~500M negative) from:
- jukofyork/books-fiction-paragraphs (NOTE: I have not uploaded this, but you can use my jukofyork/gutenberg-fiction-paragraphs to get similar results...)
- jukofyork/slop-fiction-paragraphs
taking around 15 days using 6x RTX A6000 over 3 machines:
(hence the 120 batch size: (num_gpus / pipeline_stages) * gradient_accumulation_steps = (6 / 2) * 40 = 120)
NOTE: Ignore the 22.69 days - it crashed whilst I was away from home and had to be restarted a week later...
The control adapter was then converted to a LoRA using control_adapter_to_lora.py:
command-a-03-2025-writer-v1-lora
and then merged using the merge-lora space:
✓ Successfully merged and uploaded model!
Model URL: https://huggingface.co/jukofyork/command-a-03-2025-writer-v1
Scale factor: 1
Processed 49 shards
Merged 128 layers with LoRA weights
See command-a-03-2025-writer-v1-lora-gguf for a LoRA in GGUF format that can be used with the --lora option on top of the base command-a-03-2025-uncut to get the same effect.
- Downloads last month
- 8



