JeanKaddour/minipile
Viewer • Updated • 1.01M • 4.63k • 149
How to use Dans-DiscountModels/TinyMistral-v2.5-MiniPile-Guidelines-E1 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="Dans-DiscountModels/TinyMistral-v2.5-MiniPile-Guidelines-E1") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Dans-DiscountModels/TinyMistral-v2.5-MiniPile-Guidelines-E1")
model = AutoModelForCausalLM.from_pretrained("Dans-DiscountModels/TinyMistral-v2.5-MiniPile-Guidelines-E1")How to use Dans-DiscountModels/TinyMistral-v2.5-MiniPile-Guidelines-E1 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "Dans-DiscountModels/TinyMistral-v2.5-MiniPile-Guidelines-E1"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Dans-DiscountModels/TinyMistral-v2.5-MiniPile-Guidelines-E1",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/Dans-DiscountModels/TinyMistral-v2.5-MiniPile-Guidelines-E1
How to use Dans-DiscountModels/TinyMistral-v2.5-MiniPile-Guidelines-E1 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "Dans-DiscountModels/TinyMistral-v2.5-MiniPile-Guidelines-E1" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Dans-DiscountModels/TinyMistral-v2.5-MiniPile-Guidelines-E1",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "Dans-DiscountModels/TinyMistral-v2.5-MiniPile-Guidelines-E1" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Dans-DiscountModels/TinyMistral-v2.5-MiniPile-Guidelines-E1",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use Dans-DiscountModels/TinyMistral-v2.5-MiniPile-Guidelines-E1 with Docker Model Runner:
docker model run hf.co/Dans-DiscountModels/TinyMistral-v2.5-MiniPile-Guidelines-E1
axolotl version: 0.3.0
base_model: Locutusque/TinyMistral-248M-v2.5
model_type: MistralForCausalLM
is_mistral_derived_model: true
load_in_8bit: false
load_in_4bit: false
strict: false
dataset_processes: 20
datasets:
- path: epfl-llm/guidelines
type: completion
field: clean_text
- path: JeanKaddour/minipile
type: completion
field: text
dataset_prepared_path: TinyMistral-FFT-data
val_set_size: 0.001
output_dir: ./TinyMistral-FFT
sequence_len: 2048
sample_packing: false
pad_to_sequence_len: true
adapter:
lora_model_dir:
lora_r:
lora_alpha:
lora_dropout:
lora_target_linear:
lora_fan_in_fan_out:
# wandb configuration
wandb_project: TinyMistral-FFT
wandb_watch:
wandb_run_id:
wandb_log_model:
gradient_accumulation_steps: 2
micro_batch_size: 4
num_epochs: 1
optimizer: paged_adamw_32bit
lr_scheduler: constant
cosine_min_lr_ratio:
learning_rate: 0.00005
train_on_inputs: true
group_by_length: false
bf16: true
fp16: false
tf32: false
gradient_checkpointing: false
early_stopping_patience:
resume_from_checkpoint:
auto_resume_from_checkpoints: True
local_rank:
logging_steps: 1
xformers_attention:
flash_attention: true
flash_attn_cross_entropy: false
flash_attn_rms_norm: true
flash_attn_fuse_qkv: false
flash_attn_fuse_mlp: true
warmup_steps: 10
evals_per_epoch: 100
# eval_steps: 10
eval_table_size:
saves_per_epoch: 50
debug:
deepspeed: #deepspeed/zero2.json # multi-gpu only
weight_decay: 0
# tokens:
special_tokens:
bos_token: "<|bos|>"
eos_token: "<|endoftext|>"
unk_token: "<unk>"
This model was further trained on the epfl-llm/guidelines and JeanKaddour/minipile datasets for 1 epoch.
More information needed
More information needed
More information needed
The following hyperparameters were used during training: