Text Generation
Transformers
PyTorch
Safetensors
llama
text2text-generation
conversational
text-generation-inference
Instructions to use Defetya/openllama-3b-saiga with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Defetya/openllama-3b-saiga with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Defetya/openllama-3b-saiga") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Defetya/openllama-3b-saiga") model = AutoModelForCausalLM.from_pretrained("Defetya/openllama-3b-saiga", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Defetya/openllama-3b-saiga with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Defetya/openllama-3b-saiga" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Defetya/openllama-3b-saiga", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Defetya/openllama-3b-saiga
- SGLang
How to use Defetya/openllama-3b-saiga 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 "Defetya/openllama-3b-saiga" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Defetya/openllama-3b-saiga", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "Defetya/openllama-3b-saiga" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Defetya/openllama-3b-saiga", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Defetya/openllama-3b-saiga with Docker Model Runner:
docker model run hf.co/Defetya/openllama-3b-saiga
Commit History
-
Adding `safetensors` variant of this model
Verified signatureThis is an automated PR created with https://huggingface.co/spaces/safetensors/convert This new file is equivalent to `pytorch_model.bin` but safe in the sense that no arbitrary code can be put into it. These files also happen to load much faster than their pytorch counterpart: https://colab.research.google.com/github/huggingface/notebooks/blob/main/safetensors_doc/en/speed.ipynb The widgets on your model page will run using this model even if this is not merged making sure the file actually works. If you find any issues: please report here: https://huggingface.co/spaces/safetensors/convert/discussions Feel free to ignore this PR.303a35f -
Upload LlamaForCausalLM
Verified signature5fb8403 -
Delete pytorch_model.bin
Verified signature97cd128 -
Delete config.json
Verified signature375a6cf -
Delete model.safetensors.index.json
Verified signature10ac847 -
Upload LlamaForCausalLM
Verified signaturec8d5e8c -
Delete model-00002-of-00002.safetensors
Verified signature752e981 -
Delete model-00001-of-00002.safetensors
Verified signature4db5765
-
Upload LlamaForCausalLM
Verified signature0dbecca -
Delete model-00002-of-00002.safetensors
Verified signaturec4af734 -
Delete model-00001-of-00002.safetensors
Verified signatureb18aa53 -
Upload streaming_params with huggingface_hub
Verified signature5c58c68 -
Delete streaming_params
Verified signaturee2fbb59
-
Upload LlamaForCausalLM
Verified signaturec7e2901 -
Delete model-00002-of-00002.safetensors
Verified signature103083d -
Delete model-00001-of-00002.safetensors
Verified signaturec523b2a -
Upload streaming_params
Verified signature0472aaf -
Delete streaming_params
Verified signature99b2349
-
Upload LlamaForCausalLM
Verified signature5d6f740 -
Delete model-00002-of-00002.safetensors
Verified signaturecd6617f -
Delete model-00001-of-00002.safetensors
Verified signaturedf46190 -
Upload streaming_params
Verified signature87dfc32 -
Delete streaming_params
Verified signature8533d75 -
Update README.md
Verified signaturec23144d -
Update README.md
Verified signature86189a1 -
Update README.md
Verified signature03097c4 -
Update README.md
Verified signature79d1f25 -
Update README.md
Verified signatureffe089e -
Update README.md
Verified signatureeb8d1ff -
Update README.md
Verified signature872773d -
Update README.md
Verified signature1517a79 -
Upload LlamaForCausalLM
Verified signatureda4cbb0 -
Upload streaming_params
Verified signature5b3981e
-
Upload LlamaForCausalLM
Verified signature6eec60c -
Upload streaming_params
Verified signature5474702 -
Delete model-00002-of-00002.safetensors
Verified signature0b76f57 -
Delete model-00001-of-00002.safetensors
Verified signature266724c -
Upload 2 files
Verified signature1c40d05 -
Delete model-00002-of-00002.safetensors
Verified signature5f86866 -
Delete model-00001-of-00002.safetensors
Verified signature5fe3cf8 -
Delete streaming_params
Verified signatureccb5a20 -
Update README.md
Verified signature5f83e0d -
Update README.md
Verified signatureec96a63 -
Upload LlamaForCausalLM
Verified signature8b7f471 -
Upload 2 files
Verified signaturea29d8f6 -
Delete model.safetensors.index.json
Verified signature0e24f62 -
Delete model-00002-of-00002.safetensors
Verified signature7dd80e9 -
Delete model-00001-of-00002.safetensors
Verified signature7aef8e0 -
Upload streaming_params
Verified signature5132d9e
-
Upload LlamaForCausalLM
Verified signature25798ab