Instructions to use ccore/LLAMA2-446m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ccore/LLAMA2-446m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ccore/LLAMA2-446m")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ccore/LLAMA2-446m") model = AutoModelForCausalLM.from_pretrained("ccore/LLAMA2-446m", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ccore/LLAMA2-446m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ccore/LLAMA2-446m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ccore/LLAMA2-446m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ccore/LLAMA2-446m
- SGLang
How to use ccore/LLAMA2-446m 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 "ccore/LLAMA2-446m" \ --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": "ccore/LLAMA2-446m", "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 "ccore/LLAMA2-446m" \ --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": "ccore/LLAMA2-446m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ccore/LLAMA2-446m with Docker Model Runner:
docker model run hf.co/ccore/LLAMA2-446m
| { | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 0.9005276529216337, | |
| "eval_steps": 500, | |
| "global_step": 9, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.1, | |
| "learning_rate": 0.001, | |
| "loss": 2.3313, | |
| "step": 1 | |
| }, | |
| { | |
| "epoch": 0.2, | |
| "learning_rate": 0.001, | |
| "loss": 3.851, | |
| "step": 2 | |
| }, | |
| { | |
| "epoch": 0.3, | |
| "learning_rate": 0.001, | |
| "loss": 3.2287, | |
| "step": 3 | |
| }, | |
| { | |
| "epoch": 0.4, | |
| "learning_rate": 0.001, | |
| "loss": 2.7855, | |
| "step": 4 | |
| }, | |
| { | |
| "epoch": 0.5, | |
| "learning_rate": 0.001, | |
| "loss": 2.6085, | |
| "step": 5 | |
| }, | |
| { | |
| "epoch": 0.6, | |
| "learning_rate": 0.001, | |
| "loss": 2.4226, | |
| "step": 6 | |
| }, | |
| { | |
| "epoch": 0.7, | |
| "learning_rate": 0.001, | |
| "loss": 2.3728, | |
| "step": 7 | |
| }, | |
| { | |
| "epoch": 0.8, | |
| "learning_rate": 0.001, | |
| "loss": 2.3366, | |
| "step": 8 | |
| }, | |
| { | |
| "epoch": 0.9, | |
| "learning_rate": 0.001, | |
| "loss": 2.2684, | |
| "step": 9 | |
| }, | |
| { | |
| "epoch": 0.9, | |
| "step": 9, | |
| "total_flos": 9440754728435712.0, | |
| "train_loss": 2.689473125669691, | |
| "train_runtime": 118.9327, | |
| "train_samples_per_second": 43.024, | |
| "train_steps_per_second": 0.076 | |
| } | |
| ], | |
| "logging_steps": 1.0, | |
| "max_steps": 9, | |
| "num_train_epochs": 1, | |
| "save_steps": -9, | |
| "total_flos": 9440754728435712.0, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |