玩模型开放模型 · 清晰来源 · 自主选择
返回模型目录
Ryex /

Tower-Plus-9B-abliterated-hf-data

HF 源站

Ryex/Tower-Plus-9B-abliterated-hf-data is an uncensored open-source model hosted on Hugging Face.

Text GenerationsafetensorsPyTorchChineseEnglishMultilingualLicense: cc-by-nc-sa-4.09Btransformersgemma2conversationaldenlisesfrptukhirucskojaitdaplhusvnorofitext-generation-inference
README.md说明 / 使用方法

base_model: google/gemma-2-9b license: cc-by-nc-sa-4.0 language:

  • de
  • nl
  • is
  • es
  • fr
  • pt
  • uk
  • hi
  • zh
  • ru
  • cs
  • ko
  • ja
  • it
  • en
  • da
  • pl
  • hu
  • sv
  • 'no'
  • ro
  • fi library_name: transformers

Model Card for Model ID

A fairly effective attempt at uncensoring Tower Plus, while maintaining some core functionality. Below is taken directly from Unbabel/Tower-Plus-9B

Usage:

When using the model, make sure your prompt is formated correctly!

Also, we recommend using VLLM rather than Hugging Face.

Using on VLLM:

# pip install vllm
# Gemma by default only uses 4k context. You need to set the following variables:
# export VLLM_WORKER_MULTIPROC_METHOD=spawn
# export VLLM_ALLOW_LONG_MAX_MODEL_LEN=1

from vllm import LLM, SamplingParams

sampling_params = SamplingParams(
  best_of=1,
  temperature=0,
  max_tokens=8192,
)
llm = LLM(model="Unbabel/Tower-Plus-9B", tensor_parallel_size=1)
messages = [{"role": "user", "content": "Translate the following English source text to Portuguese (Portugal):\nEnglish: Hello world!\nPortuguese (Portugal): "}]
outputs = llm.chat(messages, sampling_params)
# Make sure your prompt_token_ids look like this
print (outputs[0].outputs[0].text)
# > Olá, mundo!

Using on Transformers:

# Install transformers from source - only needed for versions <= v4.34
# pip install git+https://github.com/huggingface/transformers.git
# pip install accelerate
import torch
from transformers import pipeline

pipe = pipeline("text-generation", model="Unbabel/Tower-Plus-9B", device_map="auto")
# We use the tokenizer’s chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating
messages = [{"role": "user", "content": "Translate the following English source text to Portuguese (Portugal):\nEnglish: Hello world!\nPortuguese (Portugal): "}]
input_ids = pipe.tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True)
outputs = pipe(messages, max_new_tokens=256, do_sample=False)
print(outputs[0]["generated_text"])

Citation

@misc{rei2025towerplus,
      title={Tower+: Bridging Generality and Translation Specialization in Multilingual LLMs}, 
      author={Ricardo Rei and Nuno M. Guerreiro and José Pombal and João Alves and Pedro Teixeirinha and Amin Farajian and André F. T. Martins},
      year={2025},
      eprint={2506.17080},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2506.17080}, 
}
HUGGING FACE

上游数据

HF 下载量13
HF 点赞量0

HF 下载量为源站最近 30 天统计,与本站点击分开。

SITE STATS

本站统计

下载点击—
请求数—
匿名去重—最近 7 天—

本站下载量记录按钮点击,不代表下载完成;短时连点会去重。

来源与版本

作者
Ryex
最近更新
2025/11/19
最新创建
2025/11/18
HF 趋势
未知
数据快照
2026/09/17
版本
未知
许可证
cc-by-nc-sa-4.0