Text Generation
Transformers
Safetensors
GGUF
qwen3
Generated from Trainer
sft
unsloth
trl
conversational
text-generation-inference
Instructions to use staeiou/bartleby-qwen3-1.7b_v5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use staeiou/bartleby-qwen3-1.7b_v5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="staeiou/bartleby-qwen3-1.7b_v5") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("staeiou/bartleby-qwen3-1.7b_v5") model = AutoModelForCausalLM.from_pretrained("staeiou/bartleby-qwen3-1.7b_v5") 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]:])) - llama-cpp-python
How to use staeiou/bartleby-qwen3-1.7b_v5 with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="staeiou/bartleby-qwen3-1.7b_v5", filename="bartleby-qwen3-1.7b_v5-Q4_K_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use staeiou/bartleby-qwen3-1.7b_v5 with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf staeiou/bartleby-qwen3-1.7b_v5:Q4_K_M # Run inference directly in the terminal: llama cli -hf staeiou/bartleby-qwen3-1.7b_v5:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf staeiou/bartleby-qwen3-1.7b_v5:Q4_K_M # Run inference directly in the terminal: llama cli -hf staeiou/bartleby-qwen3-1.7b_v5:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf staeiou/bartleby-qwen3-1.7b_v5:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf staeiou/bartleby-qwen3-1.7b_v5:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf staeiou/bartleby-qwen3-1.7b_v5:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf staeiou/bartleby-qwen3-1.7b_v5:Q4_K_M
Use Docker
docker model run hf.co/staeiou/bartleby-qwen3-1.7b_v5:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use staeiou/bartleby-qwen3-1.7b_v5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "staeiou/bartleby-qwen3-1.7b_v5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "staeiou/bartleby-qwen3-1.7b_v5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/staeiou/bartleby-qwen3-1.7b_v5:Q4_K_M
- SGLang
How to use staeiou/bartleby-qwen3-1.7b_v5 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 "staeiou/bartleby-qwen3-1.7b_v5" \ --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": "staeiou/bartleby-qwen3-1.7b_v5", "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 "staeiou/bartleby-qwen3-1.7b_v5" \ --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": "staeiou/bartleby-qwen3-1.7b_v5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use staeiou/bartleby-qwen3-1.7b_v5 with Ollama:
ollama run hf.co/staeiou/bartleby-qwen3-1.7b_v5:Q4_K_M
- Unsloth Studio
How to use staeiou/bartleby-qwen3-1.7b_v5 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 staeiou/bartleby-qwen3-1.7b_v5 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 staeiou/bartleby-qwen3-1.7b_v5 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for staeiou/bartleby-qwen3-1.7b_v5 to start chatting
- Atomic Chat new
- Docker Model Runner
How to use staeiou/bartleby-qwen3-1.7b_v5 with Docker Model Runner:
docker model run hf.co/staeiou/bartleby-qwen3-1.7b_v5:Q4_K_M
- Lemonade
How to use staeiou/bartleby-qwen3-1.7b_v5 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull staeiou/bartleby-qwen3-1.7b_v5:Q4_K_M
Run and chat with the model
lemonade run user.bartleby-qwen3-1.7b_v5-Q4_K_M
List all available models
lemonade list
Upload folder using huggingface_hub
Browse files- .gitattributes +3 -0
- README.md +58 -0
- bartleby-qwen3-1.7b_v5-Q4_K_M.gguf +3 -0
- bartleby-qwen3-1.7b_v5-Q8_0.gguf +3 -0
- chat_template.jinja +1 -0
- config.json +66 -0
- generation_config.json +13 -0
- logs.log +31 -0
- model.safetensors +3 -0
- tokenizer.json +3 -0
- tokenizer_config.json +15 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
bartleby-qwen3-1.7b_v5-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
bartleby-qwen3-1.7b_v5-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: unsloth/Qwen3-1.7B
|
| 3 |
+
library_name: transformers
|
| 4 |
+
model_name: bartleby-qwen3-1.7b_v5
|
| 5 |
+
tags:
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- sft
|
| 8 |
+
- unsloth
|
| 9 |
+
- trl
|
| 10 |
+
licence: license
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# Model Card for bartleby-qwen3-1.7b_v5
|
| 14 |
+
|
| 15 |
+
This model is a fine-tuned version of [unsloth/Qwen3-1.7B](https://huggingface.co/unsloth/Qwen3-1.7B).
|
| 16 |
+
It has been trained using [TRL](https://github.com/huggingface/trl).
|
| 17 |
+
|
| 18 |
+
## Quick start
|
| 19 |
+
|
| 20 |
+
```python
|
| 21 |
+
from transformers import pipeline
|
| 22 |
+
|
| 23 |
+
question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
|
| 24 |
+
generator = pipeline("text-generation", model="None", device="cuda")
|
| 25 |
+
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
|
| 26 |
+
print(output["generated_text"])
|
| 27 |
+
```
|
| 28 |
+
|
| 29 |
+
## Training procedure
|
| 30 |
+
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
This model was trained with SFT.
|
| 35 |
+
|
| 36 |
+
### Framework versions
|
| 37 |
+
|
| 38 |
+
- TRL: 0.24.0
|
| 39 |
+
- Transformers: 5.3.0
|
| 40 |
+
- Pytorch: 2.9.0
|
| 41 |
+
- Datasets: 4.3.0
|
| 42 |
+
- Tokenizers: 0.22.2
|
| 43 |
+
|
| 44 |
+
## Citations
|
| 45 |
+
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
Cite TRL as:
|
| 49 |
+
|
| 50 |
+
```bibtex
|
| 51 |
+
@misc{vonwerra2022trl,
|
| 52 |
+
title = {{TRL: Transformer Reinforcement Learning}},
|
| 53 |
+
author = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
|
| 54 |
+
year = 2020,
|
| 55 |
+
journal = {GitHub repository},
|
| 56 |
+
publisher = {GitHub},
|
| 57 |
+
howpublished = {\url{https://github.com/huggingface/trl}}
|
| 58 |
+
}
|
bartleby-qwen3-1.7b_v5-Q4_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:15144fc6b36c8211095142ac82223c20d85374a00aa4254290ed135c02342c65
|
| 3 |
+
size 1107405024
|
bartleby-qwen3-1.7b_v5-Q8_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:673dca886a8ab87f2651a794d17209499ff670bb229a977a7cb1385708fb231f
|
| 3 |
+
size 1834422496
|
chat_template.jinja
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{% for message in messages %}{{ '<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>\n' }}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}
|
config.json
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Qwen3ForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": null,
|
| 8 |
+
"dtype": "bfloat16",
|
| 9 |
+
"eos_token_id": 151645,
|
| 10 |
+
"head_dim": 128,
|
| 11 |
+
"hidden_act": "silu",
|
| 12 |
+
"hidden_size": 2048,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 6144,
|
| 15 |
+
"layer_types": [
|
| 16 |
+
"full_attention",
|
| 17 |
+
"full_attention",
|
| 18 |
+
"full_attention",
|
| 19 |
+
"full_attention",
|
| 20 |
+
"full_attention",
|
| 21 |
+
"full_attention",
|
| 22 |
+
"full_attention",
|
| 23 |
+
"full_attention",
|
| 24 |
+
"full_attention",
|
| 25 |
+
"full_attention",
|
| 26 |
+
"full_attention",
|
| 27 |
+
"full_attention",
|
| 28 |
+
"full_attention",
|
| 29 |
+
"full_attention",
|
| 30 |
+
"full_attention",
|
| 31 |
+
"full_attention",
|
| 32 |
+
"full_attention",
|
| 33 |
+
"full_attention",
|
| 34 |
+
"full_attention",
|
| 35 |
+
"full_attention",
|
| 36 |
+
"full_attention",
|
| 37 |
+
"full_attention",
|
| 38 |
+
"full_attention",
|
| 39 |
+
"full_attention",
|
| 40 |
+
"full_attention",
|
| 41 |
+
"full_attention",
|
| 42 |
+
"full_attention",
|
| 43 |
+
"full_attention"
|
| 44 |
+
],
|
| 45 |
+
"max_position_embeddings": 40960,
|
| 46 |
+
"max_window_layers": 28,
|
| 47 |
+
"model_name": "unsloth/Qwen3-1.7B",
|
| 48 |
+
"model_type": "qwen3",
|
| 49 |
+
"num_attention_heads": 16,
|
| 50 |
+
"num_hidden_layers": 28,
|
| 51 |
+
"num_key_value_heads": 8,
|
| 52 |
+
"pad_token_id": 151669,
|
| 53 |
+
"rms_norm_eps": 1e-06,
|
| 54 |
+
"rope_parameters": {
|
| 55 |
+
"rope_theta": 1000000,
|
| 56 |
+
"rope_type": "default"
|
| 57 |
+
},
|
| 58 |
+
"sliding_window": null,
|
| 59 |
+
"tie_word_embeddings": true,
|
| 60 |
+
"transformers_version": "5.3.0",
|
| 61 |
+
"unsloth_fixed": true,
|
| 62 |
+
"unsloth_version": "2026.3.5",
|
| 63 |
+
"use_cache": false,
|
| 64 |
+
"use_sliding_window": false,
|
| 65 |
+
"vocab_size": 151936
|
| 66 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"do_sample": true,
|
| 3 |
+
"eos_token_id": [
|
| 4 |
+
151645,
|
| 5 |
+
151643
|
| 6 |
+
],
|
| 7 |
+
"max_length": 40960,
|
| 8 |
+
"pad_token_id": 151669,
|
| 9 |
+
"temperature": 0.6,
|
| 10 |
+
"top_k": 20,
|
| 11 |
+
"top_p": 0.95,
|
| 12 |
+
"transformers_version": "5.3.0"
|
| 13 |
+
}
|
logs.log
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
================================================================================
|
| 2 |
+
BARTLEBY FULL FINETUNE _ 16-BIT _ AUTO TEMPLATE+MASK DETECT _ LAST-ANSWER MULTITURN
|
| 3 |
+
================================================================================
|
| 4 |
+
MODEL : unsloth/Qwen3-1.7B
|
| 5 |
+
DATA : data/training_data_v2_filtered.jsonl
|
| 6 |
+
GOLD : data/gold_seed_training_data_sosts.jsonl
|
| 7 |
+
OUTPUT : staeiou/bartleby-qwen3-1.7b_v5
|
| 8 |
+
CACHE_DIR : /workspace/.cache/huggingface/datasets
|
| 9 |
+
SEQ : 1024
|
| 10 |
+
PACKING : False
|
| 11 |
+
LOAD_4BIT : False (forced 16-bit base)
|
| 12 |
+
FULL_FT : True
|
| 13 |
+
REMOTE_CODE: False
|
| 14 |
+
FAMILY : qwen
|
| 15 |
+
TRL_COMPAT : ConstantLengthDataset patched=True
|
| 16 |
+
ADAPTERS : disabled
|
| 17 |
+
TRAIN : bs=2 grad_accum=16 eff_bs=32
|
| 18 |
+
EPOCHS : 2.0
|
| 19 |
+
LR : 1e-05 scheduler=cosine warmup=0.03 weight_decay=0.05 max_grad_norm=1.0
|
| 20 |
+
MULTITURN : num=0 max_turns=5 (only last assistant supervised)
|
| 21 |
+
GOLD_REPEAT: 5
|
| 22 |
+
GPU : Single GPU (CUDA_VISIBLE_DEVICES=0)
|
| 23 |
+
================================================================================
|
| 24 |
+
|
| 25 |
+
[1/7] Loading base model...
|
| 26 |
+
==((====))== Unsloth 2026.3.5: Fast Qwen3 patching. Transformers: 5.3.0. vLLM: 0.1
|
| 27 |
+
3.0.
|
| 28 |
+
\\ /| NVIDIA RTX 5000 Ada Generation. Num GPUs = 1. Max memory: 31.475 GB.
|
| 29 |
+
Platform: Linux.
|
| 30 |
+
O^O/ \_/ \ Torch: 2.9.0+cu128. CUDA: 8.9. CUDA Toolkit: 12.8. Triton: 3.5.0
|
| 31 |
+
\ / Bfloat16 = TRUE. FA [Xformers = 0.0.33.post1. FA2 = False] "-____-" Free license: http://github.com/unslothai/unsloth
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4209b4da76725f22961ffca6aa5a6d86af1376ab9b71a096b8143e5e88dd6fda
|
| 3 |
+
size 3441185608
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:45c4ffda6666cf6d75d0b1f961f25964e2a52a62e78aaecb2f458e9ba9824112
|
| 3 |
+
size 11422840
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"backend": "tokenizers",
|
| 4 |
+
"bos_token": null,
|
| 5 |
+
"clean_up_tokenization_spaces": false,
|
| 6 |
+
"eos_token": "<|im_end|>",
|
| 7 |
+
"errors": "replace",
|
| 8 |
+
"is_local": false,
|
| 9 |
+
"model_max_length": 40960,
|
| 10 |
+
"pad_token": "<|PAD_TOKEN|>",
|
| 11 |
+
"padding_side": "left",
|
| 12 |
+
"split_special_tokens": false,
|
| 13 |
+
"tokenizer_class": "Qwen2Tokenizer",
|
| 14 |
+
"unk_token": null
|
| 15 |
+
}
|