初始化项目,由ModelHub XC社区提供模型
Model: Muse-research/Muse-3B Source: Original Platform
This commit is contained in:
105
README.md
Normal file
105
README.md
Normal file
@@ -0,0 +1,105 @@
|
||||
---
|
||||
library_name: transformers
|
||||
license: apache-2.0
|
||||
pipeline_tag: text-generation
|
||||
tags:
|
||||
- muse
|
||||
- chat
|
||||
- multilingual
|
||||
- text-generation
|
||||
language:
|
||||
- en
|
||||
- de
|
||||
- fr
|
||||
- it
|
||||
- es
|
||||
- pt
|
||||
---
|
||||
|
||||
# Muse-3B
|
||||
|
||||
Muse-3B is a compact 3B chat language model from **Muse Research Lab**. It is built for helpful everyday conversation, writing, simple coding help, English/German/French assistance, and safe general-purpose responses.
|
||||
|
||||
## Model Details
|
||||
|
||||
**Model Developer:** Muse Research Lab
|
||||
|
||||
**Model Architecture:** Muse-3B is an auto-regressive, Llama-style decoder-only transformer optimized for compact chat and general assistance.
|
||||
|
||||
| Model | Params | Input modalities | Output modalities | Context Length | GQA | Shared Embeddings | Knowledge cutoff |
|
||||
| :---- | :---- | :---- | :---- | :---- | :---- | :---- | :---- |
|
||||
| Muse-3B | ~3B | Multilingual text | Multilingual text and code | 8,192 tokens | Yes | Yes | Not specified |
|
||||
|
||||
**Supported Languages:** English, German, and French.
|
||||
|
||||
**Status:** This is an early compact chat model intended for lightweight assistant-style use and experimentation.
|
||||
|
||||
## Capabilities
|
||||
|
||||
- General chat and question answering
|
||||
- Writing, brainstorming, and rewriting
|
||||
- Simple coding help and explanations
|
||||
- Multilingual responses in English, German, and French
|
||||
- Safe refusal behavior for harmful requests
|
||||
|
||||
## Quickstart
|
||||
|
||||
```bash
|
||||
pip install "transformers>=4.43.0" accelerate torch
|
||||
```
|
||||
|
||||
```python
|
||||
import torch
|
||||
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||||
|
||||
MODEL_ID = "Muse-research/Muse-3B"
|
||||
|
||||
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
|
||||
model = AutoModelForCausalLM.from_pretrained(
|
||||
MODEL_ID,
|
||||
torch_dtype=torch.bfloat16,
|
||||
device_map="auto",
|
||||
)
|
||||
|
||||
messages = [
|
||||
{"role": "system", "content": "You are Muse-3B, a helpful chat assistant from Muse Research Lab."},
|
||||
{"role": "user", "content": "Hi, who are you?"},
|
||||
]
|
||||
|
||||
prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
||||
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
|
||||
|
||||
with torch.inference_mode():
|
||||
output_ids = model.generate(
|
||||
**inputs,
|
||||
max_new_tokens=256,
|
||||
temperature=0.7,
|
||||
top_p=0.9,
|
||||
do_sample=True,
|
||||
)
|
||||
|
||||
response = tokenizer.decode(output_ids[0][inputs.input_ids.shape[-1]:], skip_special_tokens=True)
|
||||
print(response)
|
||||
```
|
||||
|
||||
## Intended Use
|
||||
|
||||
Muse-3B is intended for lightweight assistant-style use, including chat, drafting, summarization, simple programming support, and English/German/French/Italian/Spanish/Portuguese everyday help.
|
||||
|
||||
## Limitations
|
||||
|
||||
- May produce incorrect or incomplete answers.
|
||||
- May struggle with advanced reasoning, long coding tasks, or highly specialized domains.
|
||||
- Multilingual support is useful but may be less reliable than English.
|
||||
- Should not be used as the only source for medical, legal, financial, or safety-critical decisions.
|
||||
- Applications should add their own safeguards when deployed to users.
|
||||
|
||||
## Safety
|
||||
|
||||
Muse-3B is designed to be helpful while refusing clearly harmful requests. For production use, pair the model with application-level safety checks, monitoring, and domain-specific policies.
|
||||
|
||||
---
|
||||
|
||||
<div align="center">
|
||||
<sub>Built by Muse Research Lab</sub>
|
||||
</div>
|
||||
Reference in New Issue
Block a user