Text Generation
Transformers
Safetensors
English
mistral
astral
demo
conversational
text-generation-inference
Instructions to use adowu/astral-demo-2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use adowu/astral-demo-2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="adowu/astral-demo-2") 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-2") model = AutoModelForCausalLM.from_pretrained("adowu/astral-demo-2", 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-2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "adowu/astral-demo-2" # 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-2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/adowu/astral-demo-2
- SGLang
How to use adowu/astral-demo-2 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-2" \ --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-2", "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-2" \ --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-2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use adowu/astral-demo-2 with Docker Model Runner:
docker model run hf.co/adowu/astral-demo-2
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,58 +1,27 @@
|
|
| 1 |
---
|
| 2 |
-
base_model:
|
| 3 |
-
- argilla/notus-7b-v1
|
| 4 |
-
- ajibawa-2023/Code-Mistral-7B
|
| 5 |
-
- HuggingFaceH4/mistral-7b-anthropic
|
| 6 |
-
- Undi95/BigL-7B
|
| 7 |
library_name: transformers
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
tags:
|
| 9 |
-
-
|
| 10 |
-
-
|
| 11 |
-
|
| 12 |
---
|
| 13 |
-
# merge
|
| 14 |
-
|
| 15 |
-
This is a merge of pre-trained language models created using [mergekit](https://github.com/cg123/mergekit).
|
| 16 |
-
|
| 17 |
-
## Merge Details
|
| 18 |
-
### Merge Method
|
| 19 |
-
|
| 20 |
-
This model was merged using the [TIES](https://arxiv.org/abs/2306.01708) merge method using [HuggingFaceH4/mistral-7b-anthropic](https://huggingface.co/HuggingFaceH4/mistral-7b-anthropic) as a base.
|
| 21 |
-
|
| 22 |
-
### Models Merged
|
| 23 |
|
| 24 |
-
|
| 25 |
-
* [argilla/notus-7b-v1](https://huggingface.co/argilla/notus-7b-v1)
|
| 26 |
-
* [ajibawa-2023/Code-Mistral-7B](https://huggingface.co/ajibawa-2023/Code-Mistral-7B)
|
| 27 |
-
* [Undi95/BigL-7B](https://huggingface.co/Undi95/BigL-7B)
|
| 28 |
|
| 29 |
-
##
|
|
|
|
| 30 |
|
| 31 |
-
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
- model: Undi95/BigL-7B
|
| 36 |
-
parameters:
|
| 37 |
-
density: 0.9
|
| 38 |
-
weight: 0.8
|
| 39 |
-
- model: ajibawa-2023/Code-Mistral-7B
|
| 40 |
-
parameters:
|
| 41 |
-
density: 0.8
|
| 42 |
-
weight: 0.7
|
| 43 |
-
- model: HuggingFaceH4/mistral-7b-anthropic
|
| 44 |
-
parameters:
|
| 45 |
-
density: 0.9
|
| 46 |
-
weight: 0.8
|
| 47 |
-
- model: argilla/notus-7b-v1
|
| 48 |
-
parameters:
|
| 49 |
-
density: 0.3
|
| 50 |
-
weight: 0.3
|
| 51 |
-
merge_method: ties
|
| 52 |
-
base_model: HuggingFaceH4/mistral-7b-anthropic
|
| 53 |
-
parameters:
|
| 54 |
-
normalize: true
|
| 55 |
-
int8_mask: true
|
| 56 |
-
dtype: bfloat16
|
| 57 |
|
| 58 |
-
|
|
|
|
|
|
| 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-2
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
+
## Overview
|
| 16 |
+
astral-demo-2 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
|