Downloads · 30 days
12
5% of all-time downloads
avans06/ALMA-7B-ct2-int8_float16
ALMA-7B-ct2-int8_float16 is a text generation model from avans06. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
The model is quantized version of the haoranxu/ALMA-7B with int8float16 quantization and can be used in CTranslate2.
Downloads · 30 days
12
5% of all-time downloads
All-time downloads
262
Public
Repo size
6.7 GB
Likes
0
Public
Click a slice to open those files.
.bin6.7 GB · 100%
From the Hugging Face model README
The model is quantized version of the haoranxu/ALMA-7B with int8_float16 quantization and can be used in CTranslate2.
ALMA (Advanced Language Model-based trAnslator) is an LLM-based translation model, which adopts a new translation model paradigm: it begins with fine-tuning on monolingual data and is further optimized using high-quality parallel data. This two-step fine-tuning process ensures strong translation performance.
The original model was converted on 2023-12 with the following command:
ct2-transformers-converter --model haoranxu/ALMA-7B --quantization int8_float16 --output_dir ALMA-7B-ct2-int8_float16 \
--copy_files generation_config.json special_tokens_map.json tokenizer.model tokenizer_config.json
Translate this from English to Chinese:
English: {prompt}
Chinese:
This example code is obtained from CTranslate2_transformers.
More detailed information about the generate_batch methon can be found at CTranslate2_Generator.generate_batch.
import ctranslate2
import transformers
generator = ctranslate2.Generator("avans06/ALMA-7B-ct2-int8_float16")
tokenizer = transformers.AutoTokenizer.from_pretrained("haoranxu/ALMA-7B")
text = "Who is Alan Turing?"
prompt = f"Translate this from English to Chinese:\nEnglish: {text}\nChinese:"
tokens = tokenizer.convert_ids_to_tokens(tokenizer.encode(prompt))
results = generator.generate_batch([tokens], max_length=256, sampling_temperature=0.7, sampling_topp=0.9, repetition_penalty=1.1, include_prompt_in_result=False)
output = tokenizer.decode(results[0].sequences_ids[0])
For more information about the original model, see its GitHub repository