PocketDoc/Dans-Prosemaxx-RepRemover-1
Preview • Updated • 38
How to use hardlyworking/4Brepremover with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="hardlyworking/4Brepremover")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("hardlyworking/4Brepremover")
model = AutoModelForCausalLM.from_pretrained("hardlyworking/4Brepremover")
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 hardlyworking/4Brepremover with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "hardlyworking/4Brepremover"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "hardlyworking/4Brepremover",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/hardlyworking/4Brepremover
How to use hardlyworking/4Brepremover with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "hardlyworking/4Brepremover" \
--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": "hardlyworking/4Brepremover",
"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 "hardlyworking/4Brepremover" \
--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": "hardlyworking/4Brepremover",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use hardlyworking/4Brepremover with Docker Model Runner:
docker model run hf.co/hardlyworking/4Brepremover
axolotl version: 0.11.0.dev0
base_model: hardlyworking/4Brp
load_in_8bit: false
load_in_4bit: false
strict: false
datasets:
- path: PocketDoc/Dans-Prosemaxx-RepRemover-1
type: dan-chat-advanced
val_set_size: 0
output_dir: ./outputs/out
dataset_prepared_path: last_run_prepared
shuffle_merged_datasets: true
hub_model_id: hardlyworking/4Brepremover
hub_strategy: "all_checkpoints"
push_dataset_to_hub:
hf_use_auth_token: true
plugins:
- axolotl.integrations.liger.LigerPlugin
- axolotl.integrations.cut_cross_entropy.CutCrossEntropyPlugin
liger_rope: true
liger_rms_norm: true
liger_layer_norm: true
liger_glu_activation: true
liger_fused_linear_cross_entropy: false
cut_cross_entropy: true
sequence_len: 32768
sample_packing: true
eval_sample_packing: true
pad_to_sequence_len: true
wandb_project: new4B
wandb_entity:
wandb_watch:
wandb_name: new4Brep
wandb_log_model:
evals_per_epoch:
eval_table_size:
eval_max_new_tokens:
gradient_accumulation_steps: 1
micro_batch_size: 8
num_epochs: 3
optimizer: adamw_bnb_8bit
lr_scheduler: cosine
learning_rate: 1e-5
train_on_inputs: false
group_by_length: false
bf16: auto
fp16:
tf32: false
gradient_checkpointing: offload
gradient_checkpointing_kwargs:
use_reentrant: false
early_stopping_patience:
resume_from_checkpoint:
local_rank:
logging_steps: 1
xformers_attention:
flash_attention: true
s2_attention:
deepspeed:
warmup_ratio: 0.05
saves_per_epoch: 1
debug:
weight_decay: 0.01
fsdp:
fsdp_config:
special_tokens:
pad_token: <|endoftext|>
This model is a fine-tuned version of hardlyworking/4Brp on the PocketDoc/Dans-Prosemaxx-RepRemover-1 dataset.
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
Base model
Salesforce/xgen-small-4B-base-r
Install from pip and serve model
# Install vLLM from pip: pip install vllm# Start the vLLM server: vllm serve "hardlyworking/4Brepremover"# Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hardlyworking/4Brepremover", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'