Text Generation
Transformers
Safetensors
English
Chinese
qwen2
mergekit
conversational
text-generation-inference
Instructions to use leafspark/Iridium-72B-v0.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use leafspark/Iridium-72B-v0.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="leafspark/Iridium-72B-v0.1") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("leafspark/Iridium-72B-v0.1") model = AutoModelForCausalLM.from_pretrained("leafspark/Iridium-72B-v0.1", 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 leafspark/Iridium-72B-v0.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "leafspark/Iridium-72B-v0.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "leafspark/Iridium-72B-v0.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/leafspark/Iridium-72B-v0.1
- SGLang
How to use leafspark/Iridium-72B-v0.1 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 "leafspark/Iridium-72B-v0.1" \ --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": "leafspark/Iridium-72B-v0.1", "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 "leafspark/Iridium-72B-v0.1" \ --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": "leafspark/Iridium-72B-v0.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use leafspark/Iridium-72B-v0.1 with Docker Model Runner:
docker model run hf.co/leafspark/Iridium-72B-v0.1
docs: update model with new name
Browse files
README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
---
|
| 2 |
license: other
|
|
|
|
|
|
|
| 3 |
pipeline_tag: text-generation
|
| 4 |
language:
|
| 5 |
- en
|
|
@@ -10,10 +12,10 @@ tags:
|
|
| 10 |
- qwen2
|
| 11 |
---
|
| 12 |
|
| 13 |
-
#
|
| 14 |
|
| 15 |
## Model Description
|
| 16 |
-
|
| 17 |
|
| 18 |
## Features
|
| 19 |
- 72 billion parameters
|
|
@@ -44,15 +46,14 @@ Custom script utilizing safetensors library.
|
|
| 44 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 45 |
import torch
|
| 46 |
|
| 47 |
-
model = AutoModelForCausalLM.from_pretrained("leafspark/
|
| 48 |
device_map="auto",
|
| 49 |
torch_dtype=torch.float16)
|
| 50 |
-
tokenizer = AutoTokenizer.from_pretrained("leafspark/
|
| 51 |
```
|
| 52 |
### GGUFs
|
| 53 |
|
| 54 |
-
Find them here: [leafspark/
|
| 55 |
-
|
| 56 |
|
| 57 |
### Hardware Requirements
|
| 58 |
- Minimum ~140GB of storage
|
|
|
|
| 1 |
---
|
| 2 |
license: other
|
| 3 |
+
license_name: tongyi-qianwen
|
| 4 |
+
license_link: https://huggingface.co/Qwen/Qwen2-72B-Instruct/blob/main/LICENSE
|
| 5 |
pipeline_tag: text-generation
|
| 6 |
language:
|
| 7 |
- en
|
|
|
|
| 12 |
- qwen2
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# Iridium-72B-v0.1
|
| 16 |
|
| 17 |
## Model Description
|
| 18 |
+
Iridium is a 72B parameter language model created through a merge of Qwen2-72B-Instruct, calme2.1-72b, and magnum-72b-v1 using `model_stock`.
|
| 19 |
|
| 20 |
## Features
|
| 21 |
- 72 billion parameters
|
|
|
|
| 46 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 47 |
import torch
|
| 48 |
|
| 49 |
+
model = AutoModelForCausalLM.from_pretrained("leafspark/Iridium-72B-v0.1",
|
| 50 |
device_map="auto",
|
| 51 |
torch_dtype=torch.float16)
|
| 52 |
+
tokenizer = AutoTokenizer.from_pretrained("leafspark/Iridium-72B-v0.1")
|
| 53 |
```
|
| 54 |
### GGUFs
|
| 55 |
|
| 56 |
+
Find them here: [leafspark/Iridium-72B-v0.1-GGUF](https://huggingface.co/leafspark/Iridium-72B-v0.1-GGUF)
|
|
|
|
| 57 |
|
| 58 |
### Hardware Requirements
|
| 59 |
- Minimum ~140GB of storage
|