Instructions to use notexist/ttt2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use notexist/ttt2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="notexist/ttt2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("notexist/ttt2") model = AutoModelForCausalLM.from_pretrained("notexist/ttt2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use notexist/ttt2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "notexist/ttt2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "notexist/ttt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/notexist/ttt2
- SGLang
How to use notexist/ttt2 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 "notexist/ttt2" \ --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": "notexist/ttt2", "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 "notexist/ttt2" \ --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": "notexist/ttt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use notexist/ttt2 with Docker Model Runner:
docker model run hf.co/notexist/ttt2
| { | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 5.0, | |
| "global_step": 18850, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 1.0, | |
| "learning_rate": 4.4446191337159036e-05, | |
| "loss": 3.7069, | |
| "step": 2827 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "eval_loss": 3.1980156898498535, | |
| "eval_runtime": 24.6141, | |
| "eval_samples_per_second": 200.048, | |
| "eval_steps_per_second": 1.584, | |
| "step": 2827 | |
| }, | |
| { | |
| "epoch": 2.0, | |
| "learning_rate": 3.333464350286927e-05, | |
| "loss": 3.0719, | |
| "step": 5654 | |
| }, | |
| { | |
| "epoch": 2.0, | |
| "eval_loss": 3.040849447250366, | |
| "eval_runtime": 7.1854, | |
| "eval_samples_per_second": 685.277, | |
| "eval_steps_per_second": 5.428, | |
| "step": 5654 | |
| }, | |
| { | |
| "epoch": 3.0, | |
| "learning_rate": 2.2223095668579518e-05, | |
| "loss": 2.8585, | |
| "step": 8481 | |
| }, | |
| { | |
| "epoch": 3.0, | |
| "eval_loss": 2.969093084335327, | |
| "eval_runtime": 7.1989, | |
| "eval_samples_per_second": 683.998, | |
| "eval_steps_per_second": 5.418, | |
| "step": 8481 | |
| }, | |
| { | |
| "epoch": 3.0, | |
| "learning_rate": 2.2222222222222223e-05, | |
| "loss": 2.7462, | |
| "step": 11310 | |
| }, | |
| { | |
| "epoch": 3.0, | |
| "eval_loss": 2.61379075050354, | |
| "eval_runtime": 25.0394, | |
| "eval_samples_per_second": 196.57, | |
| "eval_steps_per_second": 2.077, | |
| "step": 11310 | |
| }, | |
| { | |
| "epoch": 4.0, | |
| "learning_rate": 1.1111111111111112e-05, | |
| "loss": 2.6518, | |
| "step": 15080 | |
| }, | |
| { | |
| "epoch": 4.0, | |
| "eval_loss": 2.5971875190734863, | |
| "eval_runtime": 14.767, | |
| "eval_samples_per_second": 333.31, | |
| "eval_steps_per_second": 3.521, | |
| "step": 15080 | |
| }, | |
| { | |
| "epoch": 5.0, | |
| "learning_rate": 0.0, | |
| "loss": 2.5587, | |
| "step": 18850 | |
| }, | |
| { | |
| "epoch": 5.0, | |
| "eval_loss": 2.5887153148651123, | |
| "eval_runtime": 7.6626, | |
| "eval_samples_per_second": 642.341, | |
| "eval_steps_per_second": 6.786, | |
| "step": 18850 | |
| } | |
| ], | |
| "max_steps": 18850, | |
| "num_train_epochs": 5, | |
| "total_flos": 6.795617845248e+16, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |