Text Generation
Transformers
PyTorch
Safetensors
gemma
axolotl
Generated from Trainer
conversational
text-generation-inference
Instructions to use willtensora/fd1980a0-7e71-4e52-addb-318dca5991d5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use willtensora/fd1980a0-7e71-4e52-addb-318dca5991d5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="willtensora/fd1980a0-7e71-4e52-addb-318dca5991d5") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("willtensora/fd1980a0-7e71-4e52-addb-318dca5991d5") model = AutoModelForCausalLM.from_pretrained("willtensora/fd1980a0-7e71-4e52-addb-318dca5991d5", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use willtensora/fd1980a0-7e71-4e52-addb-318dca5991d5 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "willtensora/fd1980a0-7e71-4e52-addb-318dca5991d5" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "willtensora/fd1980a0-7e71-4e52-addb-318dca5991d5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/willtensora/fd1980a0-7e71-4e52-addb-318dca5991d5
- SGLang
How to use willtensora/fd1980a0-7e71-4e52-addb-318dca5991d5 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 "willtensora/fd1980a0-7e71-4e52-addb-318dca5991d5" \ --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": "willtensora/fd1980a0-7e71-4e52-addb-318dca5991d5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "willtensora/fd1980a0-7e71-4e52-addb-318dca5991d5" \ --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": "willtensora/fd1980a0-7e71-4e52-addb-318dca5991d5", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use willtensora/fd1980a0-7e71-4e52-addb-318dca5991d5 with Docker Model Runner:
docker model run hf.co/willtensora/fd1980a0-7e71-4e52-addb-318dca5991d5
File size: 1,358 Bytes
31980b7 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | base_model: unsloth/SmolLM2-360M-Instruct
batch_size: 32
bf16: true
chat_template: tokenizer_default_fallback_alpaca
datasets:
- data_files:
- f1ccd02a885008e6_train_data.json
ds_type: json
format: custom
path: /workspace/input_data/f1ccd02a885008e6_train_data.json
type:
field_input: target
field_instruction: user
field_output: assistant
format: '{instruction} {input}'
no_input_format: '{instruction}'
system_format: '{system}'
system_prompt: ''
eval_steps: 20
flash_attention: true
gpu_memory_limit: 80GiB
gradient_checkpointing: true
group_by_length: true
hub_model_id: willtensora/3da0a03a-adbb-42e3-8fd7-bd7c0b1d3e9f
hub_strategy: checkpoint
learning_rate: 0.0002
logging_steps: 10
lr_scheduler: cosine
max_steps: 2500
micro_batch_size: 4
model_type: AutoModelForCausalLM
optimizer: adamw_bnb_8bit
output_dir: /workspace/axolotl/configs
pad_to_sequence_len: true
resize_token_embeddings_to_32x: false
sample_packing: false
save_steps: 40
save_total_limit: 1
sequence_len: 2048
tokenizer_type: GPT2TokenizerFast
train_on_inputs: false
trust_remote_code: true
val_set_size: 0.1
wandb_entity: ''
wandb_mode: online
wandb_name: unsloth/SmolLM2-360M-Instruct-/tmp/f1ccd02a885008e6_train_data.json
wandb_project: Gradients-On-Demand
wandb_run: your_name
wandb_runid: default
warmup_ratio: 0.05
xformers_attention: true
|