Instructions to use kevin009/culturalmixed with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kevin009/culturalmixed with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kevin009/culturalmixed")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("kevin009/culturalmixed") model = AutoModelForCausalLM.from_pretrained("kevin009/culturalmixed") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use kevin009/culturalmixed with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kevin009/culturalmixed" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kevin009/culturalmixed", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/kevin009/culturalmixed
- SGLang
How to use kevin009/culturalmixed 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 "kevin009/culturalmixed" \ --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": "kevin009/culturalmixed", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "kevin009/culturalmixed" \ --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": "kevin009/culturalmixed", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use kevin009/culturalmixed with Docker Model Runner:
docker model run hf.co/kevin009/culturalmixed
Model Card: LoRA Configuration Causal Language Model
Training Specifications
LoRA Configuration
- Configuration:
LoraConfig- Parameters:
r: 16lora_alpha: 16lora_dropout: 0.05bias: nonetask_type: CAUSAL_LMtarget_modules: ['k_proj', 'gate_proj', 'v_proj', 'up_proj', 'q_proj', 'o_proj', 'down_proj']
- Parameters:
Model to Fine-Tune
- Function:
AutoModelForCausalLM.from_pretrained- Parameters:
model_nametorch_dtype: torch.float16load_in_4bit: True
- Configurations:
use_cache: False
- Parameters:
Reference Model
- Function:
AutoModelForCausalLM.from_pretrained- Parameters:
model_nametorch_dtype: torch.float16load_in_4bit: True
- Parameters:
Training Arguments
- Function:
TrainingArguments- Parameters:
per_device_train_batch_size: 4gradient_accumulation_steps: 4gradient_checkpointing: Truelearning_rate: 5e-5lr_scheduler_type: "cosine"max_steps: 200save_strategy: "no"logging_steps: 1output_dir: new_modeloptim: "paged_adamw_32bit"warmup_steps: 100bf16: Truereport_to: "wandb"
- Parameters:
Create DPO Trainer
- Function:
DPOTrainer- Parameters:
modelref_modelargs: training_argstrain_dataset: datasettokenizer: tokenizerpeft_config: peft_configbeta: 0.1max_prompt_length: 1024max_length: 1536
- Parameters:
- Downloads last month
- 6