Text Generation
Transformers
Safetensors
English
mistral
astral
demo
conversational
text-generation-inference
Instructions to use adowu/astral-demo-4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use adowu/astral-demo-4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="adowu/astral-demo-4") 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("adowu/astral-demo-4") model = AutoModelForCausalLM.from_pretrained("adowu/astral-demo-4", 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 adowu/astral-demo-4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "adowu/astral-demo-4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "adowu/astral-demo-4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/adowu/astral-demo-4
- SGLang
How to use adowu/astral-demo-4 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 "adowu/astral-demo-4" \ --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": "adowu/astral-demo-4", "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 "adowu/astral-demo-4" \ --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": "adowu/astral-demo-4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use adowu/astral-demo-4 with Docker Model Runner:
docker model run hf.co/adowu/astral-demo-4
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,48 +1,27 @@
|
|
| 1 |
---
|
| 2 |
-
base_model:
|
| 3 |
-
- adowu/autocodit
|
| 4 |
-
- adowu/autocodit3
|
| 5 |
-
- teknium/OpenHermes-2.5-Mistral-7B
|
| 6 |
library_name: transformers
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
tags:
|
| 8 |
-
-
|
| 9 |
-
-
|
| 10 |
-
|
| 11 |
---
|
| 12 |
-
# merge
|
| 13 |
-
|
| 14 |
-
This is a merge of pre-trained language models created using [mergekit](https://github.com/cg123/mergekit).
|
| 15 |
-
|
| 16 |
-
## Merge Details
|
| 17 |
-
### Merge Method
|
| 18 |
-
|
| 19 |
-
This model was merged using the [DARE](https://arxiv.org/abs/2311.03099) [TIES](https://arxiv.org/abs/2306.01708) merge method using [adowu/autocodit](https://huggingface.co/adowu/autocodit) as a base.
|
| 20 |
-
|
| 21 |
-
### Models Merged
|
| 22 |
|
| 23 |
-
|
| 24 |
-
* [adowu/autocodit3](https://huggingface.co/adowu/autocodit3)
|
| 25 |
-
* [teknium/OpenHermes-2.5-Mistral-7B](https://huggingface.co/teknium/OpenHermes-2.5-Mistral-7B)
|
| 26 |
|
| 27 |
-
##
|
|
|
|
| 28 |
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
- model: adowu/autocodit3
|
| 34 |
-
parameters:
|
| 35 |
-
density: 1.0
|
| 36 |
-
weight: 0.8
|
| 37 |
-
- model: teknium/OpenHermes-2.5-Mistral-7B
|
| 38 |
-
parameters:
|
| 39 |
-
density: 0.6
|
| 40 |
-
weight: 1.0
|
| 41 |
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
parameters:
|
| 45 |
-
normalize: true
|
| 46 |
-
int8_mask: true
|
| 47 |
-
dtype: bfloat16
|
| 48 |
-
```
|
|
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
library_name: transformers
|
| 3 |
+
license: apache-2.0
|
| 4 |
+
language:
|
| 5 |
+
- en
|
| 6 |
+
pipeline_tag: text-generation
|
| 7 |
tags:
|
| 8 |
+
- astral
|
| 9 |
+
- demo
|
| 10 |
+
- mistral
|
| 11 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
+
### astral-demo-4
|
|
|
|
|
|
|
| 14 |
|
| 15 |
+
## Overview
|
| 16 |
+
astral-demo-4 is a streamlined language model designed for quick demonstrations and insights into NLP capabilities, focusing on text generation and analysis.
|
| 17 |
|
| 18 |
+
## Features
|
| 19 |
+
- Efficient Text Generation: Quickly produces text for a variety of applications.
|
| 20 |
+
- Compact and Fast: Optimized for speed, making it ideal for demos and prototyping.
|
| 21 |
+
- Prototype Development: Tests ideas in conversational AI and content generation.
|
| 22 |
|
| 23 |
+
## Performance
|
| 24 |
+
Balances performance with accuracy, providing a practical demonstration of NLP technology in action.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
+
- **Developed by:** aww
|
| 27 |
+
- **Model type:** Mistral
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|