Instructions to use Neko-Institute-of-Science/LLaMA-7B-4bit-32g with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Neko-Institute-of-Science/LLaMA-7B-4bit-32g with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Neko-Institute-of-Science/LLaMA-7B-4bit-32g")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Neko-Institute-of-Science/LLaMA-7B-4bit-32g") model = AutoModelForCausalLM.from_pretrained("Neko-Institute-of-Science/LLaMA-7B-4bit-32g", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Neko-Institute-of-Science/LLaMA-7B-4bit-32g with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Neko-Institute-of-Science/LLaMA-7B-4bit-32g" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Neko-Institute-of-Science/LLaMA-7B-4bit-32g", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Neko-Institute-of-Science/LLaMA-7B-4bit-32g
- SGLang
How to use Neko-Institute-of-Science/LLaMA-7B-4bit-32g 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 "Neko-Institute-of-Science/LLaMA-7B-4bit-32g" \ --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": "Neko-Institute-of-Science/LLaMA-7B-4bit-32g", "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 "Neko-Institute-of-Science/LLaMA-7B-4bit-32g" \ --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": "Neko-Institute-of-Science/LLaMA-7B-4bit-32g", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Neko-Institute-of-Science/LLaMA-7B-4bit-32g with Docker Model Runner:
docker model run hf.co/Neko-Institute-of-Science/LLaMA-7B-4bit-32g
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
7B (act-order true-sequential groupsize)
wikitext2 5.677095890045166 (stock 16bit)
wikitext2 5.768329620361328 (32g)
wikitext2 5.833956718444824 (128g)
ptb-new 10.10704231262207 (stock 16bit)
ptb-new 10.273148536682129 (32g)
ptb-new 10.347890853881836 (128g)
c4-new 7.343583106994629 (stock 16bit)
c4-new 7.443920612335205 (32g)
c4-new 7.5146918296813965 (128g)
- Downloads last month
- 19