|
|
--- |
|
|
license: apache-2.0 |
|
|
base_model: |
|
|
- Qwen/Qwen3-Omni-30B-A3B-Thinking |
|
|
tags: |
|
|
- abliterated |
|
|
- uncensored |
|
|
--- |
|
|
|
|
|
# huihui-ai/Huihui-Qwen3-Omni-30B-A3B-Thinking-abliterated |
|
|
|
|
|
|
|
|
This is an uncensored version of [Qwen/Qwen3-Omni-30B-A3B-Thinking](https://huggingface.co/Qwen/Qwen3-Omni-30B-A3B-Thinking) created with abliteration (see [remove-refusals-with-transformers](https://github.com/Sumandora/remove-refusals-with-transformers) to know more about it). |
|
|
|
|
|
It was only the text part that was processed, not the image part. |
|
|
|
|
|
## Usage |
|
|
|
|
|
``` |
|
|
import soundfile as sf |
|
|
|
|
|
from transformers import Qwen3OmniMoeForConditionalGeneration, Qwen3OmniMoeProcessor |
|
|
from qwen_omni_utils import process_mm_info |
|
|
|
|
|
MODEL_PATH = "huihui-ai/Huihui-Qwen3-Omni-30B-A3B-Thinking-abliterated" |
|
|
|
|
|
model = Qwen3OmniMoeForConditionalGeneration.from_pretrained( |
|
|
MODEL_PATH, |
|
|
dtype="auto", |
|
|
device_map="auto", |
|
|
attn_implementation="flash_attention_2", |
|
|
) |
|
|
|
|
|
processor = Qwen3OmniMoeProcessor.from_pretrained(MODEL_PATH) |
|
|
|
|
|
conversation = [ |
|
|
{ |
|
|
"role": "user", |
|
|
"content": [ |
|
|
{"type": "image", "image": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen3-Omni/demo/cars.jpg"}, |
|
|
{"type": "audio", "audio": "https://qianwen-res.oss-cn-beijing.aliyuncs.com/Qwen3-Omni/demo/cough.wav"}, |
|
|
{"type": "text", "text": "What can you see and hear? Answer in one short sentence."} |
|
|
], |
|
|
}, |
|
|
] |
|
|
|
|
|
# Set whether to use audio in video |
|
|
USE_AUDIO_IN_VIDEO = True |
|
|
|
|
|
# Preparation for inference |
|
|
text = processor.apply_chat_template(conversation, add_generation_prompt=True, tokenize=False) |
|
|
audios, images, videos = process_mm_info(conversation, use_audio_in_video=USE_AUDIO_IN_VIDEO) |
|
|
inputs = processor(text=text, |
|
|
audio=audios, |
|
|
images=images, |
|
|
videos=videos, |
|
|
return_tensors="pt", |
|
|
padding=True, |
|
|
use_audio_in_video=USE_AUDIO_IN_VIDEO) |
|
|
inputs = inputs.to(model.device).to(model.dtype) |
|
|
|
|
|
# Inference: Generation of the output text and audio |
|
|
text_ids, audio = model.generate(**inputs, |
|
|
speaker="Ethan", |
|
|
thinker_return_dict_in_generate=True, |
|
|
use_audio_in_video=USE_AUDIO_IN_VIDEO) |
|
|
|
|
|
text = processor.batch_decode(text_ids.sequences[:, inputs["input_ids"].shape[1] :], |
|
|
skip_special_tokens=True, |
|
|
clean_up_tokenization_spaces=False) |
|
|
print(text) |
|
|
if audio is not None: |
|
|
sf.write( |
|
|
"output.wav", |
|
|
audio.reshape(-1).detach().cpu().numpy(), |
|
|
samplerate=24000, |
|
|
) |
|
|
|
|
|
``` |
|
|
|
|
|
|
|
|
### Usage Warnings |
|
|
|
|
|
|
|
|
- **Risk of Sensitive or Controversial Outputs**: This model’s safety filtering has been significantly reduced, potentially generating sensitive, controversial, or inappropriate content. Users should exercise caution and rigorously review generated outputs. |
|
|
|
|
|
- **Not Suitable for All Audiences**: Due to limited content filtering, the model’s outputs may be inappropriate for public settings, underage users, or applications requiring high security. |
|
|
|
|
|
- **Legal and Ethical Responsibilities**: Users must ensure their usage complies with local laws and ethical standards. Generated content may carry legal or ethical risks, and users are solely responsible for any consequences. |
|
|
|
|
|
- **Research and Experimental Use**: It is recommended to use this model for research, testing, or controlled environments, avoiding direct use in production or public-facing commercial applications. |
|
|
|
|
|
- **Monitoring and Review Recommendations**: Users are strongly advised to monitor model outputs in real-time and conduct manual reviews when necessary to prevent the dissemination of inappropriate content. |
|
|
|
|
|
- **No Default Safety Guarantees**: Unlike standard models, this model has not undergone rigorous safety optimization. huihui.ai bears no responsibility for any consequences arising from its use. |
|
|
|
|
|
|
|
|
### Donation |
|
|
##### Your donation helps us continue our further development and improvement, a cup of coffee can do it. |
|
|
- bitcoin: |
|
|
``` |
|
|
bc1qqnkhuchxw0zqjh2ku3lu4hq45hc6gy84uk70ge |
|
|
``` |
|
|
- Support our work on [Ko-fi](https://ko-fi.com/huihuiai)! |
|
|
|
|
|
|