psychopenguin/indian_legal_dataset_qna
Viewer • Updated • 37k • 86
How to use psychopenguin/t1 with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("PicoKittens/PicoMistral-23M")
model = PeftModel.from_pretrained(base_model, "psychopenguin/t1")How to use psychopenguin/t1 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="psychopenguin/t1") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("psychopenguin/t1")
model = AutoModelForCausalLM.from_pretrained("psychopenguin/t1")How to use psychopenguin/t1 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "psychopenguin/t1"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "psychopenguin/t1",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/psychopenguin/t1
How to use psychopenguin/t1 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "psychopenguin/t1" \
--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": "psychopenguin/t1",
"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 "psychopenguin/t1" \
--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": "psychopenguin/t1",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use psychopenguin/t1 with Docker Model Runner:
docker model run hf.co/psychopenguin/t1
axolotl version: 0.16.0.dev0
seed: 9
auto_resume_from_checkpoints: True
tokenizer_save_jinja_files: True
trust_remote_code: True
tokenizer_use_fast: True
gradient_accumulation: True
load_best_model_at_end: true
base_model: PicoKittens/PicoMistral-23M
model_type: AutoModelForCausalLM
tokenizer_type: AutoTokenizer
datasets:
- path: psychopenguin/indian_legal_dataset_qna
type: alpaca
split: train[:2%]
sequence_len: 256
fp16: True
adapter: lora
lora_target_linear: True
lora_r: 4
lora_alpha: 8
lora_dropout: 0.05
sdp_attention: True
optimizer: adamw_bnb_8bit
learning_rate: 0.0002
lr_scheduler: cosine
gradient_accumulation_steps: 2
micro_batch_size: 2 #for gpu memory increase
num_epochs: 3
neftune_noise_alpha: 5
early_stopping_patience: 3
save_steps: 100
val_set_size: 0.30
eval_strategy: steps
eval_steps: 100
use_wandb: True
wandb_project: tttt
wandb_name: t1
output_dir: ./final_model
merge_lora: True
hf_use_auth_token: True
hub_model_id: psychopenguin/t1
This model is a fine-tuned version of PicoKittens/PicoMistral-23M on the psychopenguin/indian_legal_dataset_qna dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Ppl | Reserved (gib) | Active (gib) | Allocated (gib) |
|---|---|---|---|---|---|---|---|
| No log | 0 | 0 | 4.4009 | 81.5219 | 0.19 | 0.13 | 0.13 |
| 4.2451 | 0.7843 | 100 | 3.8304 | 46.0793 | 0.37 | 0.14 | 0.14 |
| 3.8029 | 1.5647 | 200 | 3.7486 | 42.4637 | 0.37 | 0.14 | 0.14 |
| 3.7756 | 2.3451 | 300 | 3.7170 | 41.1408 | 0.36 | 0.14 | 0.14 |
| 3.7043 | 2.9882 | 382 | 3.7133 | 40.9894 | 0.13 | 0.13 | 0.19 |
Base model
PicoKittens/PicoMistral-23M