bluuwhale/nsfwstory2
Viewer • Updated • 77.7k • 73 • 16
How to use mrcuddle/lummaid-fusion-14B-lora with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("mrcuddle/arcee-fusion-lumaid-12B")
model = PeftModel.from_pretrained(base_model, "mrcuddle/lummaid-fusion-14B-lora")How to use mrcuddle/lummaid-fusion-14B-lora with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="mrcuddle/lummaid-fusion-14B-lora")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("mrcuddle/lummaid-fusion-14B-lora")
model = AutoModelForCausalLM.from_pretrained("mrcuddle/lummaid-fusion-14B-lora", 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]:]))How to use mrcuddle/lummaid-fusion-14B-lora with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "mrcuddle/lummaid-fusion-14B-lora"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "mrcuddle/lummaid-fusion-14B-lora",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/mrcuddle/lummaid-fusion-14B-lora
How to use mrcuddle/lummaid-fusion-14B-lora with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "mrcuddle/lummaid-fusion-14B-lora" \
--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": "mrcuddle/lummaid-fusion-14B-lora",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "mrcuddle/lummaid-fusion-14B-lora" \
--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": "mrcuddle/lummaid-fusion-14B-lora",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use mrcuddle/lummaid-fusion-14B-lora with Docker Model Runner:
docker model run hf.co/mrcuddle/lummaid-fusion-14B-lora
axolotl version: 0.18.0
adapter: qlora
base_model: mrcuddle/arcee-fusion-lumaid-12B
bf16: false
chat_template: mistral_v2v3
dataloader_num_workers: 2
dataloader_pin_memory: true
dataloader_prefetch_factor: 8
datasets:
- eot_tokens:
- <|im_end|>
field: story
path: bluuwhale/nsfwstory2
split: train
type: completion
embeddings_skip_upcast: true
fp16: true
gradient_accumulation_steps: 1
gradient_checkpointing: true
gradient_checkpointing_kwargs:
use_reentrant: false
learning_rate: 0.00019
load_in_4bit: true
logging_steps: 1
lora_alpha: 64
lora_mlp_kernel: true
lora_o_kernel: true
lora_qkv_kernel: true
lora_r: 32
lora_target_modules:
- q_proj
- k_proj
- v_proj
- o_proj
- gate_proj
- down_proj
- up_proj
lr_scheduler: cosine
max_grad_norm: 0.1
micro_batch_size: 1
num_epochs: 1
optimizer: paged_adamw_8bit
output_dir: ./outputs/qwen-sft-pirate-rrr
plugins:
- axolotl.integrations.cut_cross_entropy.CutCrossEntropyPlugin
sample_packing: true
saves_per_epoch: 2
sequence_len: 4096
warmup_steps: 5
xformers_attention: true
axolotl version: 0.18.0
adapter: qlora
base_model: mrcuddle/arcee-fusion-lumaid-12B
bf16: false
chat_template: mistral_v2v3
dataloader_num_workers: 2
dataloader_pin_memory: true
dataloader_prefetch_factor: 8
datasets:
- eot_tokens:
- <|im_end|>
field: story
path: bluuwhale/nsfwstory2
split: train
type: completion
embeddings_skip_upcast: true
fp16: true
gradient_accumulation_steps: 1
gradient_checkpointing: true
gradient_checkpointing_kwargs:
use_reentrant: false
learning_rate: 0.00019
load_in_4bit: true
logging_steps: 1
lora_alpha: 64
lora_mlp_kernel: true
lora_o_kernel: true
lora_qkv_kernel: true
lora_r: 32
lora_target_modules:
- q_proj
- k_proj
- v_proj
- o_proj
- gate_proj
- down_proj
- up_proj
lr_scheduler: cosine
max_grad_norm: 0.1
micro_batch_size: 1
num_epochs: 1
optimizer: paged_adamw_8bit
output_dir: ./outputs/qwen-sft-pirate-rrr
plugins:
- axolotl.integrations.cut_cross_entropy.CutCrossEntropyPlugin
sample_packing: true
saves_per_epoch: 2
sequence_len: 4096
warmup_steps: 5
xformers_attention: true
This model is a fine-tuned version of mrcuddle/arcee-fusion-lumaid-12B on the bluuwhale/nsfwstory2 dataset.
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
Base model
mrcuddle/arcee-fusion-lumaid-12B