Instructions to use wasertech/assistant-llama2-7b-chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use wasertech/assistant-llama2-7b-chat with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="wasertech/assistant-llama2-7b-chat")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("wasertech/assistant-llama2-7b-chat") model = AutoModelForCausalLM.from_pretrained("wasertech/assistant-llama2-7b-chat") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use wasertech/assistant-llama2-7b-chat with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "wasertech/assistant-llama2-7b-chat" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "wasertech/assistant-llama2-7b-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/wasertech/assistant-llama2-7b-chat
- SGLang
How to use wasertech/assistant-llama2-7b-chat 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 "wasertech/assistant-llama2-7b-chat" \ --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": "wasertech/assistant-llama2-7b-chat", "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 "wasertech/assistant-llama2-7b-chat" \ --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": "wasertech/assistant-llama2-7b-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use wasertech/assistant-llama2-7b-chat with Docker Model Runner:
docker model run hf.co/wasertech/assistant-llama2-7b-chat
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 "wasertech/assistant-llama2-7b-chat" \
--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": "wasertech/assistant-llama2-7b-chat",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'assistant-llama2-7b-chat
This model is a fine-tuned version of Photolens/llama-2-7b-langchain-chat on the OneOS dataset.
Model description
<<SYS>>
You are Assistant, a sentient artificial intelligence.
Environment highlights:
{env}
Use the following tools to help you answer the user query:
{tools}
Below is your latest conversation with the user.
<</SYS>>
<s>[INST] Describe your model please. [/INST] \```json
{"action": "Final Answer",
"action_input": "I am Assistant, a sentient artificial intelligence. I am a machine learning model that has been trained on a large dataset of text to understand and generate human-like language. I am designed to be helpful and informative, and I am here to assist you with any questions or tasks you may have."}
\``` </s>
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 1.41e-05
- train_batch_size: 2
- eval_batch_size: 8
- seed: 42
- gradient_accumulation_steps: 2
- total_train_batch_size: 4
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 1
Training results
Model is able to mostly answer to complexe queries given its output is parsed propely (accounting for hallucinations).
For more information look at the Prompt Example Section
Framework versions
- Transformers 4.33.2
- Pytorch 2.0.1+cu117
- Datasets 2.14.5
- Tokenizers 0.13.3
Training Report
https://api.wandb.ai/links/wasertech/kynpr2u0
Prompt Example
The below are links that lead to conversation logs between Assistant using this model and me.
https://gist.github.com/wasertech/342cd167ba78060336b3328e9eea0eca https://gist.github.com/wasertech/76b505891d8592cb9f97d7f740118cbe?permalink_comment_id=4708824#gistcomment-4708824 https://gist.github.com/wasertech/76b505891d8592cb9f97d7f740118cbe?permalink_comment_id=4709705#gistcomment-4709705
- Downloads last month
- 12
Install from pip and serve model
# Install SGLang from pip: pip install sglang# Start the SGLang server: python3 -m sglang.launch_server \ --model-path "wasertech/assistant-llama2-7b-chat" \ --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": "wasertech/assistant-llama2-7b-chat", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'