salamandraTA-2B-instruct-GGUF

163
2
2.0B
37 languages
Q4
llama
by
BSC-LT
Language Model
OTHER
2B params
New
163 downloads
Early-stage
Edge AI:
Mobile
Laptop
Server
5GB+ RAM
Mobile
Laptop
Server
Quick Summary

This model is the GGUF-quantized version of SalamandraTA-2b-instruct.

Device Compatibility

Mobile
4-6GB RAM
Laptop
16GB RAM
Server
GPU
Minimum Recommended
2GB+ RAM

Code Examples

textvllm
from huggingface_hub import snapshot_download
from vllm import LLM, SamplingParams

model_dir = snapshot_download(repo_id="BSC-LT/salamandraTA-2B-instruct-GGUF", revision="main")
model_name = "salamandrata_2b_inst_q4.gguf"

llm = LLM(model=model_dir + '/' + model_name, tokenizer=model_dir)

source = "Spanish"
target = "English"
sentence = "Ayer se fue, tomó sus cosas y se puso a navegar. Una camisa, un pantalón vaquero y una canción, dónde irá, dónde irá. Se despidió, y decidió batirse en duelo con el mar. Y recorrer el mundo en su velero. Y navegar, nai-na-na, navegar."

prompt = f"Translate the following text from {source} into {target}.\\n{source}: {sentence} \\n{target}:"
messages = [{'role': 'user', 'content': prompt}]

outputs = llm.chat(messages,
                   sampling_params=SamplingParams(
                       temperature=0.1,
                       stop_token_ids=[5],
                       max_tokens=200)
                   )[0].outputs

print(outputs[0].text)
textvllm
from huggingface_hub import snapshot_download
from vllm import LLM, SamplingParams

model_dir = snapshot_download(repo_id="BSC-LT/salamandraTA-2B-instruct-GGUF", revision="main")
model_name = "salamandrata_2b_inst_q4.gguf"

llm = LLM(model=model_dir + '/' + model_name, tokenizer=model_dir)

source = "Spanish"
target = "English"
sentence = "Ayer se fue, tomó sus cosas y se puso a navegar. Una camisa, un pantalón vaquero y una canción, dónde irá, dónde irá. Se despidió, y decidió batirse en duelo con el mar. Y recorrer el mundo en su velero. Y navegar, nai-na-na, navegar."

prompt = f"Translate the following text from {source} into {target}.\\n{source}: {sentence} \\n{target}:"
messages = [{'role': 'user', 'content': prompt}]

outputs = llm.chat(messages,
                   sampling_params=SamplingParams(
                       temperature=0.1,
                       stop_token_ids=[5],
                       max_tokens=200)
                   )[0].outputs

print(outputs[0].text)

Deploy This Model

Production-ready deployment in minutes

Together.ai

Instant API access to this model

Fastest API

Production-ready inference API. Start free, scale to millions.

Try Free API

Replicate

One-click model deployment

Easiest Setup

Run models in the cloud with simple API. No DevOps required.

Deploy Now

Disclosure: We may earn a commission from these partners. This helps keep LLMYourWay free.