Text Generation
Transformers
PyTorch
Safetensors
English
mistral
text-generation-inference
llama
trl
sft
conversational
Instructions to use deepanshdj/zephyr-7b-dj with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use deepanshdj/zephyr-7b-dj with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="deepanshdj/zephyr-7b-dj") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("deepanshdj/zephyr-7b-dj") model = AutoModelForCausalLM.from_pretrained("deepanshdj/zephyr-7b-dj", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use deepanshdj/zephyr-7b-dj with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "deepanshdj/zephyr-7b-dj" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "deepanshdj/zephyr-7b-dj", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/deepanshdj/zephyr-7b-dj
- SGLang
How to use deepanshdj/zephyr-7b-dj 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 "deepanshdj/zephyr-7b-dj" \ --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": "deepanshdj/zephyr-7b-dj", "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 "deepanshdj/zephyr-7b-dj" \ --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": "deepanshdj/zephyr-7b-dj", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use deepanshdj/zephyr-7b-dj with Docker Model Runner:
docker model run hf.co/deepanshdj/zephyr-7b-dj
Update README.md
Browse files
README.md
CHANGED
|
@@ -5,19 +5,39 @@ license: apache-2.0
|
|
| 5 |
tags:
|
| 6 |
- text-generation-inference
|
| 7 |
- transformers
|
| 8 |
-
-
|
| 9 |
-
- mistral
|
| 10 |
- trl
|
| 11 |
- sft
|
| 12 |
base_model: HuggingFaceH4/zephyr-7b-beta
|
| 13 |
---
|
| 14 |
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
-
|
| 18 |
-
- **License:** apache-2.0
|
| 19 |
-
- **Finetuned from model :** HuggingFaceH4/zephyr-7b-beta
|
| 20 |
|
| 21 |
-
|
| 22 |
|
| 23 |
-
[<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
|
|
|
|
| 5 |
tags:
|
| 6 |
- text-generation-inference
|
| 7 |
- transformers
|
| 8 |
+
- llama
|
|
|
|
| 9 |
- trl
|
| 10 |
- sft
|
| 11 |
base_model: HuggingFaceH4/zephyr-7b-beta
|
| 12 |
---
|
| 13 |
|
| 14 |
+
---
|
| 15 |
+
## model name: zephyr-7b-dj-F16
|
| 16 |
+
## model creator: Deepansh Jha
|
| 17 |
+
## huggingface id: deepanshdj
|
| 18 |
+
## finetuned dataset: osaat1 (https://huggingface.co/datasets/deepanshdj/ossat1_8k_llama3)
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
# π¦ Welcome to the zephyr-7b-dj-F16 Wonderland! π
|
| 22 |
+
|
| 23 |
+
## Unleash the Power of Conversation with zephyr-7b-dj-F16
|
| 24 |
+
|
| 25 |
+
Dive into the enchanting world of zephyr-7b-dj-F16, a marvel crafted by the ingenious Deepansh Jha! π Licensed under the Apache License 2.0, this model is your passport to the realms of captivating dialogue and spellbinding text generation. π©β¨
|
| 26 |
+
|
| 27 |
+
## Discover the Magic
|
| 28 |
+
|
| 29 |
+
Envisioned with creativity and nurtured with passion, zephyr-7b-dj-F16 is your companion for all things conversational! π¬ Whether you're weaving stories, sparking conversations, or crafting dialogues, this model is your trusty guide through the wonders of language. ππ
|
| 30 |
+
|
| 31 |
+
## Model Maven
|
| 32 |
+
|
| 33 |
+
- **Model Creator:** Deepansh Jha
|
| 34 |
+
- **License:** Apache License 2.0
|
| 35 |
+
|
| 36 |
+
## Embark on Your Journey
|
| 37 |
+
|
| 38 |
+
Unleash the potential of zephyr-7b-dj-F16 in your projects and endeavors! Let its charm and versatility illuminate your path to linguistic greatness. πβ¨
|
| 39 |
|
| 40 |
+
## Join the Adventure
|
|
|
|
|
|
|
| 41 |
|
| 42 |
+
Come, be a part of this magical journey! π Contribute, explore, and create with zephyr-7b-dj-F16. The possibilities are as endless as the imagination itself! ππ
|
| 43 |
|
|
|