Edit model card

Carvalho_pt-gl-1.3B

How to use

import torch
from transformers import pipeline, AutoTokenizer, AutoModelForCausalLM

token_HF=""#Obter na páxina de HuggingFace
input_text = "Hoxe fai un bo día. O sol  "

model_id  = "Nos-PT/Carvalho_pt-gl-1.3B"
tokenizer = AutoTokenizer.from_pretrained(model_id, use_auth_token=token_HF)
model = AutoModelForCausalLM.from_pretrained(model_id, use_auth_token=token_HF)
generator = pipeline(
    "text-generation",
    model=model,
    tokenizer=tokenizer,
    torch_dtype=torch.bfloat16,
    trust_remote_code=True,
    device_map="auto",
)
generation = generator(
    input_text,
    do_sample=True,
    top_k=10,
    eos_token_id=tokenizer.eos_token_id
)

print(f"Result: {generation[0]['generated_text']}")
Downloads last month
85
Safetensors
Model size
1.32B params
Tensor type
FP16
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Spaces using Nos-PT/Carvalho_pt-gl-1.3B 2