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
Download da9e44b3-e4fb-4905-9c7c-6b03aad6b593.yml from willtensora/fd1980a0-7e71-4e52-addb-318dca5991d5: direct link, hf CLI and curl.
- Browser
- Download file 1.36 kB
-
https://huggingface.co/willtensora/fd1980a0-7e71-4e52-addb-318dca5991d5/resolve/main/da9e44b3-e4fb-4905-9c7c-6b03aad6b593.yml
- Command line
-
hf download hf://willtensora/fd1980a0-7e71-4e52-addb-318dca5991d5/da9e44b3-e4fb-4905-9c7c-6b03aad6b593.yml
-
curl -L -o da9e44b3-e4fb-4905-9c7c-6b03aad6b593.yml https://huggingface.co/willtensora/fd1980a0-7e71-4e52-addb-318dca5991d5/resolve/main/da9e44b3-e4fb-4905-9c7c-6b03aad6b593.yml
1.36 kB
| 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 | |