Instructions to use BrokenSoul/llama-2-7b-miniguanaco with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use BrokenSoul/llama-2-7b-miniguanaco with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="BrokenSoul/llama-2-7b-miniguanaco")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("BrokenSoul/llama-2-7b-miniguanaco") model = AutoModelForCausalLM.from_pretrained("BrokenSoul/llama-2-7b-miniguanaco") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use BrokenSoul/llama-2-7b-miniguanaco with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "BrokenSoul/llama-2-7b-miniguanaco" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "BrokenSoul/llama-2-7b-miniguanaco", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/BrokenSoul/llama-2-7b-miniguanaco
- SGLang
How to use BrokenSoul/llama-2-7b-miniguanaco 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 "BrokenSoul/llama-2-7b-miniguanaco" \ --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": "BrokenSoul/llama-2-7b-miniguanaco", "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 "BrokenSoul/llama-2-7b-miniguanaco" \ --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": "BrokenSoul/llama-2-7b-miniguanaco", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use BrokenSoul/llama-2-7b-miniguanaco with Docker Model Runner:
docker model run hf.co/BrokenSoul/llama-2-7b-miniguanaco
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
BrokenSoul/llama-2-7b-miniguanaco
This is a test model finetuned for learning.
How to use
from transformers import (
AutoTokenizer,
pipeline
)
model_name = "BrokenSoul/llama-2-7b-miniguanaco"
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
tokenizer.pad_token = tokenizer.eos_token
tokenizer.padding_side = "right"
prompt = "What is a large language model?"
pipe = pipeline(task="text-generation", model=model_name, tokenizer=tokenizer, max_length=200)
result = pipe(f"<s>[INST] {prompt} [/INST]")
print(result[0]['generated_text'])
Training data
mlabonne/guanaco-llama2-1k dataset.
Training procedure
It was trained following the maximelabonne's guide. all credits for him.
license: apache-2.0 language: - en pipeline_tag: text-generation
- Downloads last month
- 2