Instructions to use mjalg/llama-2-7b-mjalg-android14 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mjalg/llama-2-7b-mjalg-android14 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mjalg/llama-2-7b-mjalg-android14")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mjalg/llama-2-7b-mjalg-android14") model = AutoModelForCausalLM.from_pretrained("mjalg/llama-2-7b-mjalg-android14", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mjalg/llama-2-7b-mjalg-android14 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mjalg/llama-2-7b-mjalg-android14" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mjalg/llama-2-7b-mjalg-android14", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/mjalg/llama-2-7b-mjalg-android14
- SGLang
How to use mjalg/llama-2-7b-mjalg-android14 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 "mjalg/llama-2-7b-mjalg-android14" \ --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": "mjalg/llama-2-7b-mjalg-android14", "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 "mjalg/llama-2-7b-mjalg-android14" \ --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": "mjalg/llama-2-7b-mjalg-android14", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use mjalg/llama-2-7b-mjalg-android14 with Docker Model Runner:
docker model run hf.co/mjalg/llama-2-7b-mjalg-android14
Commit History
-
Upload 2 files
439acc6 -
Upload 2 files
de30f96 -
Upload config.json
976dd07 -
Delete config.json
02eb35b -
Update config.json
0ffa6cb -
Create config.json
baf34b3 -
Rename config.json to adapter_config.json
5fcec31 -
Rename adapter_config.json to config.json
0aee5e4 -
Upload 2 files
0abc071 -
Delete adapter_model (1).bin
773a762 -
Delete adapter_model.bin
bc0f443 -
Delete config.json
6fe4de1 -
Delete adapter_config (1).json
7639ae8 -
Delete README (1).md
142f142 -
Upload 3 files
0616389 -
Rename adapter_config.json to config.json
a720cbd -
Upload 2 files
0f45eed -
initial commit
4d70895