Instituto IA/LNCC logo

Manaca 1B Base

Manacav1B BaseCurrent
Released September 1, 2026
Context4.1K tokens
CategoryLarge Language Model

About Manaca 1B Base

Manaca 1B Base is an open, reproducible Brazilian-Portuguese text-generation model built with a Llama-style architecture and published with a Hugging Face model card.

Capabilities

textportuguesetext generation

Input Modalities

text

Output Modalities

text

Technical Details

API Identifier
menezesbruno/manaca-1b-base
Category
Large Language Model
Context Window
4,096 tokens

Tags

portuguesebrazilian-portugueseopen-weightllamatext-generationtransformers

Run this model yourself

Local and cloud setup for Manaca 1B Base, with exact configurations, sources and clear evidence limits.

Find a model for your hardware
Local hardwareDocumented setupSources checked Oct 16, 2026

Run Manacá raw text continuation on a 32 GiB Intel desktop

Serve the exact 1.72B-parameter Brazilian-Portuguese base model using native Transformers, its corrected lowercase Unigram tokenizer and CPU FP32. A reader-authored private completion endpoint accepts raw text and returns only newly generated text. Use four threads, one request, 4,096 total tokens and a 40-token greedy check. 32 GiB RAM and 40 GiB disk are planning allocations; full fit and performance are unknown.

Hardware
Intel Core i5-12400 desktop, 4 inference threads, 32 GiB RAM
Runtime
Native Transformers Llama with reader-authored private raw-completion service Transformers 4.57.6; torch 2.6.0+cpu cp312; Python 3.12; author-selected FP32 · CPU
Model format
safetensors · CPU FP32 runtime from native BF16 checkpoint · No quantization; native BF16 checkpoint converted to FP32 in CPU memory
Workload
4,096 token context · 1 concurrent

Based on source documentation; this setup has not been executed by OpenTools. Memory: unknown. No compatible measurement available.

Read the complete setup guide

Before you start

  • Use an owned Intel Core i5-12400 desktop with Ubuntu 24.04 x86_64, 32 GiB installed RAM and 40 GiB free disk. Allocate four inference threads and build natively on the same host.
  • Use exact native model/tokenizer files, Python 3.12, Transformers 4.57.6 and the hashed torch 2.6.0 CPU wheel. No remote model code or GPU driver is used.
  • The publisher model is base pretrained Brazilian-Portuguese text continuation, not instruction-tuned chat. Use the corrected native Unigram tokenizer, which normalizes NFKC then lowercase.
  • Read the pinned CC BY 4.0 declarations and official project LICENSE; retain attribution, license link and change notices. 32 GiB RAM and 40 GiB disk are allocations, not measured fit.

Exact model and requirements

Artifact:
AIInstituteLNCC (catalog repository redirects from menezesbruno) / Manacá-1B Base native safetensors (1,722,951,680 publisher parameters) · checkpoint AIInstituteLNCC/manaca-1b-base
Publisher revision:
a9f5da7cb220ec4b0205a45da2455946c44e812f
Artifact digest:
sha256:9edc4dc112199a8c7dd73b0e10a70d69cf8e46e42e4db5505051935451fa6648
Download size:
3.21 GiB
Memory requirement (unknown):
Unknown — No full peak measured for exact native Manacá CPU FP32 model, tokenizer, cache and wrapper.
System RAM / disk:
Unknown / Unknown
Placement:
single device. One CPU host; no tensor/pipeline sharding. Entire model on CPU; no device_map, GPU or disk offload.
KV cache:
FP32 native attention K/V under the explicitly FP32 CPU model; full peak memory unmeasured.
Workload:
4,096 token context; Unknown; Unknown; concurrency 1; batch 1; cache unknown; repetitions Unknown.
Tokenizer:
Exact native fast Unigram tokenizer with NFKC then Lowercase and native BOS · a9f5da7cb220ec4b0205a45da2455946c44e812f
Sampling / reasoning:
Greedy do_sample=False and max_new_tokens 40 follow the publisher raw-continuation example. Wrapper permits 1–64 new tokens and enforces input plus output <=4,096; repetition_penalty 1 is an explicit author choice. Pretrained base raw continuation; no chat template, instruction role formatting, thinking controls or tool executor. Newly generated token IDs are decoded separately from input.
Runtime prerequisites:
Ubuntu 24.04 x86_64; See prerequisites above.

Official artifact · License

Exact model README declares CC BY 4.0 and links the official project, whose pinned LICENSE states attribution, license-link and change-notice obligations and no additional restrictions. Root model LICENSE returned 404 and Creative Commons legalcode requests returned 403; these failures are preserved. No OSI approval or legal-clearance claim. Retain appropriate creator credit and applicable notices when sharing.

  • The original native artifact is 3,445,946,840 bytes. Converting BF16 weights to FP32 increases weight memory; attention cache, buffers, OS and dependencies add memory. File size is not full fit.
  • 32 GiB RAM, 40 GiB disk and four threads are author planning allocations, not measured minimums. No sibling model fit or performance is transferred.

One-time setup and hardware

hardware
Unknown — Existing desktop purchase price and incremental hardware cost depend on the reader; unknown.
Existing desktop purchase price and incremental hardware cost depend on the reader; unknown. Tax: unknown.
setup
Unknown — Initial provisioning/build time and labor cost are unknown.
Initial provisioning/build time and labor cost are unknown. Tax: unknown.

Recurring costs

electricity
Unknown — Actual wall power, electricity rate and powered hours are unknown; no TDP-to-wall-power conversion.
Actual wall power, electricity rate and powered hours are unknown; no TDP-to-wall-power conversion. Tax: unknown.
storage
Unknown — Incremental cost of local disk capacity is unknown. The 40 GiB free-disk walkthrough allocation is an author choice, not a measured requirement.
Incremental cost of local disk capacity is unknown. The 40 GiB free-disk walkthrough allocation is an author choice, not a measured requirement. Tax: unknown.
egress
Unknown — Data transfer price, allowances and traffic volume are unknown.
Data transfer price, allowances and traffic volume are unknown. Tax: unknown.
administration
Unknown — Maintenance labor rate and hours are unknown.
Maintenance labor rate and hours are unknown. Tax: unknown.

Install the runtime

  1. 1. Create the Python 3.12 CPU environment

    Install the exact official CPU wheel by hash and Transformers version. System and transitive package versions resolve at installation; save the resulting environment. This is not an executed compatibility claim.

    Command
    sudo apt-get update
    sudo apt-get install -y python3.12 python3.12-venv curl ca-certificates openssl
    mkdir -p "$HOME/manaca-hosting/model"
    cd "$HOME/manaca-hosting"
    python3.12 -m venv .venv
    .venv/bin/python -m pip install "https://download.pytorch.org/whl/cpu/torch-2.6.0%2Bcpu-cp312-cp312-linux_x86_64.whl#sha256=59e78aa0c690f70734e42670036d6b541930b8eabbaa18d94e090abf14cc4d91"
    .venv/bin/python -m pip install "transformers==4.57.6"
    .venv/bin/python -m pip check
    .venv/bin/python -m pip freeze > resolved-environment.txt

    Expected result: pip check succeeds; resolved-environment.txt records actual installed versions. Stop on resolver or hash errors.

Download the model

  1. 1. Download exact native model and tokenizer inputs

    Verify original full safetensors and every config/tokenizer auxiliary before loading. Do not replace the corrected native tokenizer. No chat-template file is supplied.

    Command
    cd "$HOME/manaca-hosting"
    curl --fail --location --output model/model.safetensors 'https://huggingface.co/AIInstituteLNCC/manaca-1b-base/resolve/a9f5da7cb220ec4b0205a45da2455946c44e812f/model.safetensors'
    curl --fail --location --output model/config.json 'https://huggingface.co/AIInstituteLNCC/manaca-1b-base/raw/a9f5da7cb220ec4b0205a45da2455946c44e812f/config.json'
    curl --fail --location --output model/generation_config.json 'https://huggingface.co/AIInstituteLNCC/manaca-1b-base/raw/a9f5da7cb220ec4b0205a45da2455946c44e812f/generation_config.json'
    curl --fail --location --output model/tokenizer.json 'https://huggingface.co/AIInstituteLNCC/manaca-1b-base/raw/a9f5da7cb220ec4b0205a45da2455946c44e812f/tokenizer.json'
    curl --fail --location --output model/tokenizer_config.json 'https://huggingface.co/AIInstituteLNCC/manaca-1b-base/raw/a9f5da7cb220ec4b0205a45da2455946c44e812f/tokenizer_config.json'
    curl --fail --location --output model/special_tokens_map.json 'https://huggingface.co/AIInstituteLNCC/manaca-1b-base/raw/a9f5da7cb220ec4b0205a45da2455946c44e812f/special_tokens_map.json'
    sha256sum --check <<'SHA256'
    9edc4dc112199a8c7dd73b0e10a70d69cf8e46e42e4db5505051935451fa6648  model/model.safetensors
    960455d76cfde168f01275bb7f5ecb537f556d7ab43e0968caf962e3eb2b8a54  model/config.json
    fab3c8a907d34bf38e431f9481082e70b0d908549f0ca6598346cf4246c4f8a3  model/generation_config.json
    480e672df73cf57b4ea3ef1318480a1e0e8043bf2c2715199347eb6b57dd5efc  model/tokenizer.json
    3454edc64167105fbeb494d0767bf205d017a3613a83931ed480f48f883dd917  model/tokenizer_config.json
    358c249e2fb29060c6b73157d428853b0c48710deffc8ee670ab1013880946c9  model/special_tokens_map.json
    SHA256

    Expected result: All six files report OK. Model is 3,445,946,840 bytes; stop on any failed download or digest mismatch.

Configure

  1. 1. Create a private service key

    Create a local service credential only when absent; preserve an existing key. No provider API credential is needed. Never print or share it.

    Command
    cd "$HOME/manaca-hosting"
    umask 077
    if [ ! -e .api-key ]; then openssl rand -hex 32 > .api-key; fi
    test -s .api-key || { echo "Restore empty service key before proceeding"; exit 1; }
    chmod 600 .api-key

    Expected result: Nonempty private .api-key exists; previous credential preserved.

  2. 2. Create the reader-authored raw-completion service

    This bounded single-request educational service is part of this walkthrough, not a publisher server. It binds loopback, authenticates health and generation, limits JSON bodies and token budget, and checks native tokenizer normalization and model bias support at startup.

    Command
    cd "$HOME/manaca-hosting"
    cat > manaca_server.py <<'PYSERVER'
    """OpenTools reader-authored educational demonstrator; not publisher server."""
    import hmac,json,os
    from http.server import BaseHTTPRequestHandler,HTTPServer
    
    def check_budget(count,limit):
        if count>4032 or count+limit>4096: raise ValueError('token_budget')
    
    def handler_factory(generate,key):
        class Handler(BaseHTTPRequestHandler):
            protocol_version='HTTP/1.0'
            def setup(self):
                super().setup(); self.connection.settimeout(10)
            def log_message(self,*args): pass
            def reply(self,status,data):
                body=json.dumps(data,ensure_ascii=False).encode()
                self.send_response(status); self.send_header('Content-Type','application/json; charset=utf-8')
                self.send_header('Content-Length',str(len(body))); self.end_headers(); self.wfile.write(body)
            def authorized(self):
                value=self.headers.get('Authorization','').encode()
                return hmac.compare_digest(value,('Bearer '+key).encode())
            def do_GET(self):
                if not self.authorized(): return self.reply(401,{'error':'unauthorized'})
                if self.path!='/health': return self.reply(404,{'error':'not_found'})
                self.reply(200,{'status':'ready'})
            def do_POST(self):
                if not self.authorized(): return self.reply(401,{'error':'unauthorized'})
                if self.path!='/v1/manaca': return self.reply(404,{'error':'not_found'})
                if self.headers.get('Transfer-Encoding') is not None: return self.reply(400,{'error':'transfer_encoding_unsupported'})
                if self.headers.get_content_type()!='application/json': return self.reply(415,{'error':'json_required'})
                lengths=self.headers.get_all('Content-Length',[])
                if len(lengths)!=1 or not lengths[0] or not all('0'<=c<='9' for c in lengths[0]): return self.reply(411,{'error':'content_length_required'})
                if len(lengths[0])>4: return self.reply(413,{'error':'body_limit'})
                n=int(lengths[0])
                if not 1<=n<=8192: return self.reply(413,{'error':'body_limit'})
                try:
                    raw=self.rfile.read(n)
                    if len(raw)!=n: return self.reply(400,{'error':'incomplete_body'})
                    data=json.loads(raw)
                except (ValueError,UnicodeError,TimeoutError): return self.reply(400,{'error':'invalid_json'})
                if type(data)!=dict or set(data)!={'prompt','max_new_tokens'} or type(data['prompt'])!=str or not data['prompt'].strip() or type(data['max_new_tokens'])!=int or not 1<=data['max_new_tokens']<=64:
                    return self.reply(400,{'error':'invalid_fields'})
                try: result=generate(data['prompt'],data['max_new_tokens'])
                except ValueError: return self.reply(422,{'error':'token_budget'})
                except Exception: return self.reply(500,{'error':'generation_failed'})
                self.reply(200,result)
        return Handler
    
    def main():
        import torch
        from transformers import AutoTokenizer,AutoModelForCausalLM
        key=open('.api-key',encoding='ascii').read().strip()
        if len(key)!=64 or any(c not in '0123456789abcdef' for c in key): raise SystemExit('Invalid service key')
        torch.set_num_threads(4)
        tok=AutoTokenizer.from_pretrained('./model',local_files_only=True,trust_remote_code=False,use_fast=True)
        assert tok.is_fast
        backend=json.loads(tok.backend_tokenizer.to_str())
        assert backend['model']['type']=='Unigram'
        assert backend['normalizer']=={'type':'Sequence','normalizers':[{'type':'NFKC'},{'type':'Lowercase'}]}
        assert tok('A CAPITAL DO BRASIL É',add_special_tokens=False)['input_ids']==tok('a capital do brasil é',add_special_tokens=False)['input_ids']
        model=AutoModelForCausalLM.from_pretrained('./model',local_files_only=True,trust_remote_code=False,dtype=torch.float32).to('cpu').eval()
        cfg=model.config
        assert cfg.model_type=='llama' and cfg.num_hidden_layers==24 and cfg.hidden_size==2048
        assert cfg.attention_bias and cfg.mlp_bias and cfg.max_position_embeddings==4096
        assert model.model.layers[0].self_attn.q_proj.bias is not None
        assert model.model.layers[0].mlp.gate_proj.bias is not None
        assert next(model.parameters()).dtype==torch.float32
        def generate(prompt,limit):
            encoded=tok(prompt,return_tensors='pt',add_special_tokens=True)
            ids=encoded['input_ids']
            count=ids.shape[-1]
            check_budget(count,limit)
            with torch.inference_mode():
                out=model.generate(ids,attention_mask=torch.ones_like(ids),max_new_tokens=limit,do_sample=False,repetition_penalty=1.0,pad_token_id=tok.eos_token_id)
            new=out[0,count:]
            return {'text':tok.decode(new,skip_special_tokens=True),'input_tokens':count,'output_tokens':len(new),'eos_reached':bool(len(new) and int(new[-1])==tok.eos_token_id),'output_cap_reached':len(new)==limit}
        HTTPServer(('127.0.0.1',8997),handler_factory(generate,key)).serve_forever()
    if __name__=='__main__': main()
    PYSERVER
    .venv/bin/python -m py_compile manaca_server.py

    Expected result: Python syntax check succeeds; no model is loaded by py_compile.

Start the model

  1. 1. Start one CPU raw-completion service

    Run in a foreground terminal. Startup loads local files in CPU FP32, asserts fast Unigram normalization, case-equivalent tokenization, native 24-layer config and attention/MLP biases. Any failed check must stop startup. One HTTPServer processes one request at a time; do not treat this as a production server.

    Command
    cd "$HOME/manaca-hosting"
    .venv/bin/python manaca_server.py

    Expected result: After loading, authenticated /health returns ready. Full fit and startup compatibility are documented, not executed here.

Connect to your endpoint

http://127.0.0.1:8997/v1/manaca

Same desktop loopback only; trusted private host.

Access: loopback. Reader-generated private Bearer key required for health and completion. Exact JSON fields prompt:string and max_new_tokens:integer 1–64. This is a reader-authored raw completion schema, not chat or a provider API.

Verify the setup

  1. 1. Check native raw continuation and access control

    Use a second terminal on the server. This lowercased raw prompt follows the publisher example. Confirm output excludes the echoed prompt and returns text, input_tokens, output_tokens, eos_reached and output_cap_reached. The input count includes native BOS. A base model may reach its requested cap without EOS; that is a bounded continuation, not an instruction-answer failure or a completed-document guarantee. Inspect generated text; no exact word or factual reliability is promised.

    Command
    cd "$HOME/manaca-hosting"
    MANACA_SERVICE_KEY="$(cat .api-key)"
    curl --fail http://127.0.0.1:8997/health -H "Authorization: Bearer $MANACA_SERVICE_KEY"
    curl --fail http://127.0.0.1:8997/v1/manaca -H "Authorization: Bearer $MANACA_SERVICE_KEY" -H 'Content-Type: application/json' -d '{"prompt":"a capital do brasil é","max_new_tokens":40}'
    curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:8997/health
    unset MANACA_SERVICE_KEY

    Expected result: Authorized health ready; response has continuation-only text and numeric token counts, 1–40 output IDs, explicit EOS/cap booleans. Missing key returns 401. No model execution outcome is claimed in this guide.

Performance evidence

No compatible measurement available. Documented support and estimated memory do not establish response speed.

Limits and troubleshooting

  • Documented only; no weights, installation, build or inference executed. Full memory fit, latency, speed and continuation quality remain unknown.
  • Manacá has 1,722,951,680 parameters despite its rounded 1B name; native Llama attention and MLP biases must remain enabled.
  • Use the exact fast tokenizer with NFKC and Lowercase. The tokenizer model_max_length sentinel is not the model limit; enforce native 4,096 combined input/output tokens. The input count includes native BOS.
  • Greedy 40-token continuation follows publisher example. No instruction-following, chat-template, thinking or exact-answer guarantee. Decoding returns only new IDs; EOS and cap flags distinguish a naturally stopped versus capped continuation.
  • Native weights are BF16; this CPU walkthrough explicitly converts to FP32. No quantized model or generic BF16 CPU speed claim is transferred.
  • The reader-authored HTTPServer is a serial educational private endpoint: one request at a time, 8,192-byte body limit, 10-second socket-read timeout, strict JSON fields and token budget. No generation timeout, multiprocess resilience, TLS or public-service hardening is supplied.
  • System and transitive dependencies resolve at installation. Record pip freeze and pip check; exact installed runtime compatibility remains unexecuted.
  • 32 GiB RAM, 40 GiB disk and four threads are allocations, not measured minima. Original dated AWS compute/storage excludes tax and unknown egress/admin; local power/purchase unknown.
  • Native README and linked official project LICENSE declare CC BY 4.0. Root LICENSE404 and CC legalcode403 are preserved; no legal-clearance or OSI claim. Broader workflow/backend/OS coverage remains open.
Tokenizer/config startup assertion fails
Stop. Recheck all exact native auxiliary hashes and native fast tokenizer normalization. Do not invent a chat template or remove bias assertions.
HTTP401,415,411,413 or422
Use the matching private key, JSON Content-Type and a single valid Content-Length. Keep the body <=8,192 bytes and prompt plus requested output <=4,096 native tokens; max_new_tokens must be 1–64.
Empty or unhelpful continuation
Inspect EOS/cap flags and decoded new token IDs. This is a base model; do not test it as an instruction chatbot. No exact completion is guaranteed.
Out of memory or connection refused
Inspect foreground startup and available host RAM. Stop on load failure. Resource or precision changes form a newly documented configuration.

Stop the model

  1. 1. Stop the service

    Press Ctrl+C in the server terminal. Unset the key in each client shell. Confirm loopback port no longer serves.

    Command
    unset MANACA_SERVICE_KEY

    Expected result: The foreground service stops; loopback port 8997 no longer serves.

Uninstall

  1. 1. Remove dedicated files

    After confirming the path and preserving wanted logs, remove only this walkthrough directory. Shared apt packages remain.

    Command
    rm -r -- "$HOME/manaca-hosting"

    Expected result: Dedicated model, environment, wrapper and private key removed.

Sources and verification

Sources checked Oct 16, 2026. Verification source

Compare this configuration
Cloud serverDocumented setupSources checked Oct 16, 2026

Self-host Manacá raw text continuation on an AWS CPU VM

Serve the exact 1.72B-parameter Brazilian-Portuguese base model using native Transformers, its corrected lowercase Unigram tokenizer and CPU FP32. A reader-authored private completion endpoint accepts raw text and returns only newly generated text. Use four threads, one request, 4,096 total tokens and a 40-token greedy check. 32 GiB RAM and 40 GiB disk are planning allocations; full fit and performance are unknown.

Hardware
AWS r7i.xlarge, 32 GiB RAM, Ubuntu x86_64
Runtime
Native Transformers Llama with reader-authored private raw-completion service Transformers 4.57.6; torch 2.6.0+cpu cp312; Python 3.12; author-selected FP32 · CPU
Model format
safetensors · CPU FP32 runtime from native BF16 checkpoint · No quantization; native BF16 checkpoint converted to FP32 in CPU memory
Workload
4,096 token context · 1 concurrent

Based on source documentation; this setup has not been executed by OpenTools. Memory: unknown. No compatible measurement available.

Read the complete setup guide

Before you start

  • Use Ubuntu 24.04 x86_64 on AWS r7i.xlarge, four vCPUs and 32 GiB RAM, in us-east-1 with a 40 GiB gp3 root disk. Use an existing SSH key, restrict port 22 to your client IP and keep port 8997 closed to the network. Confirm quote, quota and capacity before any billable provisioning.
  • Use exact native model/tokenizer files, Python 3.12, Transformers 4.57.6 and the hashed torch 2.6.0 CPU wheel. No remote model code or GPU driver is used.
  • The publisher model is base pretrained Brazilian-Portuguese text continuation, not instruction-tuned chat. Use the corrected native Unigram tokenizer, which normalizes NFKC then lowercase.
  • Read the pinned CC BY 4.0 declarations and official project LICENSE; retain attribution, license link and change notices. 32 GiB RAM and 40 GiB disk are allocations, not measured fit.

Exact model and requirements

Artifact:
AIInstituteLNCC (catalog repository redirects from menezesbruno) / Manacá-1B Base native safetensors (1,722,951,680 publisher parameters) · checkpoint AIInstituteLNCC/manaca-1b-base
Publisher revision:
a9f5da7cb220ec4b0205a45da2455946c44e812f
Artifact digest:
sha256:9edc4dc112199a8c7dd73b0e10a70d69cf8e46e42e4db5505051935451fa6648
Download size:
3.21 GiB
Memory requirement (unknown):
Unknown — No full peak measured for exact native Manacá CPU FP32 model, tokenizer, cache and wrapper.
System RAM / disk:
Unknown / Unknown
Placement:
single device. One CPU host; no tensor/pipeline sharding. Entire model on CPU; no device_map, GPU or disk offload.
KV cache:
FP32 native attention K/V under the explicitly FP32 CPU model; full peak memory unmeasured.
Workload:
4,096 token context; Unknown; Unknown; concurrency 1; batch 1; cache unknown; repetitions Unknown.
Tokenizer:
Exact native fast Unigram tokenizer with NFKC then Lowercase and native BOS · a9f5da7cb220ec4b0205a45da2455946c44e812f
Sampling / reasoning:
Greedy do_sample=False and max_new_tokens 40 follow the publisher raw-continuation example. Wrapper permits 1–64 new tokens and enforces input plus output <=4,096; repetition_penalty 1 is an explicit author choice. Pretrained base raw continuation; no chat template, instruction role formatting, thinking controls or tool executor. Newly generated token IDs are decoded separately from input.
Runtime prerequisites:
Ubuntu 24.04 x86_64; See prerequisites above.

Official artifact · License

Exact model README declares CC BY 4.0 and links the official project, whose pinned LICENSE states attribution, license-link and change-notice obligations and no additional restrictions. Root model LICENSE returned 404 and Creative Commons legalcode requests returned 403; these failures are preserved. No OSI approval or legal-clearance claim. Retain appropriate creator credit and applicable notices when sharing.

  • The original native artifact is 3,445,946,840 bytes. Converting BF16 weights to FP32 increases weight memory; attention cache, buffers, OS and dependencies add memory. File size is not full fit.
  • 32 GiB RAM, 40 GiB disk and four threads are author planning allocations, not measured minimums. No sibling model fit or performance is transferred.

One-time setup and hardware

hardware
Not applicable — AWS hardware acquisition is included in compute rental; no purchased GPU required. Any separate hardware cost is not applicable.
AWS hardware acquisition is included in compute rental; no purchased GPU required. Any separate hardware cost is not applicable. Tax: unknown.
setup
Unknown — Initial provisioning/build time and labor cost are unknown.
Initial provisioning/build time and labor cost are unknown. Tax: unknown.

Recurring costs

compute
$0.26 / hour
AWS public us-east-1 Linux On-Demand rate USD 0.2646 per billed instance-hour, no paid preinstalled software. Eight hours USD 2.1168; 24 hours USD 6.3504 compute. Idle running hours bill. Storage, egress, tax and administration separate; no Spot/reservation/discount assumed. Capacity/quota unverified. Region: us-east-1. SKU: r7i.xlarge Linux On-Demand. Tax: excluded. Price dated Oct 15, 2026. Price source
storage
$0.08 / GB month
US East (N. Virginia) gp3 USD 0.08 per GB-month; AWS defines GB as 1024^3 bytes. Selected 40 GiB root volume is USD 3.20 per full month, prorated by provisioned duration. Baseline 3000 IOPS / 125 MB/s; no extras assumed. Retained snapshots/resources separate; storage persists after instance stop. Tax excluded. Region: us-east-1. SKU: EBS gp3 baseline 3000 IOPS / 125 MB/s. Tax: excluded. Price dated Oct 16, 2026. Price source
egress
Unknown — Data transfer price, allowances and traffic volume are unknown.
Data transfer price, allowances and traffic volume are unknown. Tax: unknown.
administration
Unknown — Maintenance labor rate and hours are unknown.
Maintenance labor rate and hours are unknown. Tax: unknown.

Install the runtime

  1. 1. Create the Python 3.12 CPU environment

    Install the exact official CPU wheel by hash and Transformers version. System and transitive package versions resolve at installation; save the resulting environment. This is not an executed compatibility claim.

    Command
    sudo apt-get update
    sudo apt-get install -y python3.12 python3.12-venv curl ca-certificates openssl
    mkdir -p "$HOME/manaca-hosting/model"
    cd "$HOME/manaca-hosting"
    python3.12 -m venv .venv
    .venv/bin/python -m pip install "https://download.pytorch.org/whl/cpu/torch-2.6.0%2Bcpu-cp312-cp312-linux_x86_64.whl#sha256=59e78aa0c690f70734e42670036d6b541930b8eabbaa18d94e090abf14cc4d91"
    .venv/bin/python -m pip install "transformers==4.57.6"
    .venv/bin/python -m pip check
    .venv/bin/python -m pip freeze > resolved-environment.txt

    Expected result: pip check succeeds; resolved-environment.txt records actual installed versions. Stop on resolver or hash errors.

Download the model

  1. 1. Download exact native model and tokenizer inputs

    Verify original full safetensors and every config/tokenizer auxiliary before loading. Do not replace the corrected native tokenizer. No chat-template file is supplied.

    Command
    cd "$HOME/manaca-hosting"
    curl --fail --location --output model/model.safetensors 'https://huggingface.co/AIInstituteLNCC/manaca-1b-base/resolve/a9f5da7cb220ec4b0205a45da2455946c44e812f/model.safetensors'
    curl --fail --location --output model/config.json 'https://huggingface.co/AIInstituteLNCC/manaca-1b-base/raw/a9f5da7cb220ec4b0205a45da2455946c44e812f/config.json'
    curl --fail --location --output model/generation_config.json 'https://huggingface.co/AIInstituteLNCC/manaca-1b-base/raw/a9f5da7cb220ec4b0205a45da2455946c44e812f/generation_config.json'
    curl --fail --location --output model/tokenizer.json 'https://huggingface.co/AIInstituteLNCC/manaca-1b-base/raw/a9f5da7cb220ec4b0205a45da2455946c44e812f/tokenizer.json'
    curl --fail --location --output model/tokenizer_config.json 'https://huggingface.co/AIInstituteLNCC/manaca-1b-base/raw/a9f5da7cb220ec4b0205a45da2455946c44e812f/tokenizer_config.json'
    curl --fail --location --output model/special_tokens_map.json 'https://huggingface.co/AIInstituteLNCC/manaca-1b-base/raw/a9f5da7cb220ec4b0205a45da2455946c44e812f/special_tokens_map.json'
    sha256sum --check <<'SHA256'
    9edc4dc112199a8c7dd73b0e10a70d69cf8e46e42e4db5505051935451fa6648  model/model.safetensors
    960455d76cfde168f01275bb7f5ecb537f556d7ab43e0968caf962e3eb2b8a54  model/config.json
    fab3c8a907d34bf38e431f9481082e70b0d908549f0ca6598346cf4246c4f8a3  model/generation_config.json
    480e672df73cf57b4ea3ef1318480a1e0e8043bf2c2715199347eb6b57dd5efc  model/tokenizer.json
    3454edc64167105fbeb494d0767bf205d017a3613a83931ed480f48f883dd917  model/tokenizer_config.json
    358c249e2fb29060c6b73157d428853b0c48710deffc8ee670ab1013880946c9  model/special_tokens_map.json
    SHA256

    Expected result: All six files report OK. Model is 3,445,946,840 bytes; stop on any failed download or digest mismatch.

Configure

  1. 1. Create a private service key

    Create a local service credential only when absent; preserve an existing key. No provider API credential is needed. Never print or share it.

    Command
    cd "$HOME/manaca-hosting"
    umask 077
    if [ ! -e .api-key ]; then openssl rand -hex 32 > .api-key; fi
    test -s .api-key || { echo "Restore empty service key before proceeding"; exit 1; }
    chmod 600 .api-key

    Expected result: Nonempty private .api-key exists; previous credential preserved.

  2. 2. Create the reader-authored raw-completion service

    This bounded single-request educational service is part of this walkthrough, not a publisher server. It binds loopback, authenticates health and generation, limits JSON bodies and token budget, and checks native tokenizer normalization and model bias support at startup.

    Command
    cd "$HOME/manaca-hosting"
    cat > manaca_server.py <<'PYSERVER'
    """OpenTools reader-authored educational demonstrator; not publisher server."""
    import hmac,json,os
    from http.server import BaseHTTPRequestHandler,HTTPServer
    
    def check_budget(count,limit):
        if count>4032 or count+limit>4096: raise ValueError('token_budget')
    
    def handler_factory(generate,key):
        class Handler(BaseHTTPRequestHandler):
            protocol_version='HTTP/1.0'
            def setup(self):
                super().setup(); self.connection.settimeout(10)
            def log_message(self,*args): pass
            def reply(self,status,data):
                body=json.dumps(data,ensure_ascii=False).encode()
                self.send_response(status); self.send_header('Content-Type','application/json; charset=utf-8')
                self.send_header('Content-Length',str(len(body))); self.end_headers(); self.wfile.write(body)
            def authorized(self):
                value=self.headers.get('Authorization','').encode()
                return hmac.compare_digest(value,('Bearer '+key).encode())
            def do_GET(self):
                if not self.authorized(): return self.reply(401,{'error':'unauthorized'})
                if self.path!='/health': return self.reply(404,{'error':'not_found'})
                self.reply(200,{'status':'ready'})
            def do_POST(self):
                if not self.authorized(): return self.reply(401,{'error':'unauthorized'})
                if self.path!='/v1/manaca': return self.reply(404,{'error':'not_found'})
                if self.headers.get('Transfer-Encoding') is not None: return self.reply(400,{'error':'transfer_encoding_unsupported'})
                if self.headers.get_content_type()!='application/json': return self.reply(415,{'error':'json_required'})
                lengths=self.headers.get_all('Content-Length',[])
                if len(lengths)!=1 or not lengths[0] or not all('0'<=c<='9' for c in lengths[0]): return self.reply(411,{'error':'content_length_required'})
                if len(lengths[0])>4: return self.reply(413,{'error':'body_limit'})
                n=int(lengths[0])
                if not 1<=n<=8192: return self.reply(413,{'error':'body_limit'})
                try:
                    raw=self.rfile.read(n)
                    if len(raw)!=n: return self.reply(400,{'error':'incomplete_body'})
                    data=json.loads(raw)
                except (ValueError,UnicodeError,TimeoutError): return self.reply(400,{'error':'invalid_json'})
                if type(data)!=dict or set(data)!={'prompt','max_new_tokens'} or type(data['prompt'])!=str or not data['prompt'].strip() or type(data['max_new_tokens'])!=int or not 1<=data['max_new_tokens']<=64:
                    return self.reply(400,{'error':'invalid_fields'})
                try: result=generate(data['prompt'],data['max_new_tokens'])
                except ValueError: return self.reply(422,{'error':'token_budget'})
                except Exception: return self.reply(500,{'error':'generation_failed'})
                self.reply(200,result)
        return Handler
    
    def main():
        import torch
        from transformers import AutoTokenizer,AutoModelForCausalLM
        key=open('.api-key',encoding='ascii').read().strip()
        if len(key)!=64 or any(c not in '0123456789abcdef' for c in key): raise SystemExit('Invalid service key')
        torch.set_num_threads(4)
        tok=AutoTokenizer.from_pretrained('./model',local_files_only=True,trust_remote_code=False,use_fast=True)
        assert tok.is_fast
        backend=json.loads(tok.backend_tokenizer.to_str())
        assert backend['model']['type']=='Unigram'
        assert backend['normalizer']=={'type':'Sequence','normalizers':[{'type':'NFKC'},{'type':'Lowercase'}]}
        assert tok('A CAPITAL DO BRASIL É',add_special_tokens=False)['input_ids']==tok('a capital do brasil é',add_special_tokens=False)['input_ids']
        model=AutoModelForCausalLM.from_pretrained('./model',local_files_only=True,trust_remote_code=False,dtype=torch.float32).to('cpu').eval()
        cfg=model.config
        assert cfg.model_type=='llama' and cfg.num_hidden_layers==24 and cfg.hidden_size==2048
        assert cfg.attention_bias and cfg.mlp_bias and cfg.max_position_embeddings==4096
        assert model.model.layers[0].self_attn.q_proj.bias is not None
        assert model.model.layers[0].mlp.gate_proj.bias is not None
        assert next(model.parameters()).dtype==torch.float32
        def generate(prompt,limit):
            encoded=tok(prompt,return_tensors='pt',add_special_tokens=True)
            ids=encoded['input_ids']
            count=ids.shape[-1]
            check_budget(count,limit)
            with torch.inference_mode():
                out=model.generate(ids,attention_mask=torch.ones_like(ids),max_new_tokens=limit,do_sample=False,repetition_penalty=1.0,pad_token_id=tok.eos_token_id)
            new=out[0,count:]
            return {'text':tok.decode(new,skip_special_tokens=True),'input_tokens':count,'output_tokens':len(new),'eos_reached':bool(len(new) and int(new[-1])==tok.eos_token_id),'output_cap_reached':len(new)==limit}
        HTTPServer(('127.0.0.1',8997),handler_factory(generate,key)).serve_forever()
    if __name__=='__main__': main()
    PYSERVER
    .venv/bin/python -m py_compile manaca_server.py

    Expected result: Python syntax check succeeds; no model is loaded by py_compile.

Start the model

  1. 1. Start one CPU raw-completion service

    Run in a foreground terminal. Startup loads local files in CPU FP32, asserts fast Unigram normalization, case-equivalent tokenization, native 24-layer config and attention/MLP biases. Any failed check must stop startup. One HTTPServer processes one request at a time; do not treat this as a production server.

    Command
    cd "$HOME/manaca-hosting"
    .venv/bin/python manaca_server.py

    Expected result: After loading, authenticated /health returns ready. Full fit and startup compatibility are documented, not executed here.

Connect to your endpoint

http://127.0.0.1:8997/v1/manaca

Server loopback only. On your client run ssh -N -L 8997:127.0.0.1:8997 USER@VM_IP using existing SSH access. Keep EC2 8997 closed; server-side verification reads the key on the VM.

Access: loopback. Reader-generated private Bearer key required for health and completion. Exact JSON fields prompt:string and max_new_tokens:integer 1–64. This is a reader-authored raw completion schema, not chat or a provider API.

Verify the setup

  1. 1. Check native raw continuation and access control

    Use a second terminal on the server. This lowercased raw prompt follows the publisher example. Confirm output excludes the echoed prompt and returns text, input_tokens, output_tokens, eos_reached and output_cap_reached. The input count includes native BOS. A base model may reach its requested cap without EOS; that is a bounded continuation, not an instruction-answer failure or a completed-document guarantee. Inspect generated text; no exact word or factual reliability is promised.

    Command
    cd "$HOME/manaca-hosting"
    MANACA_SERVICE_KEY="$(cat .api-key)"
    curl --fail http://127.0.0.1:8997/health -H "Authorization: Bearer $MANACA_SERVICE_KEY"
    curl --fail http://127.0.0.1:8997/v1/manaca -H "Authorization: Bearer $MANACA_SERVICE_KEY" -H 'Content-Type: application/json' -d '{"prompt":"a capital do brasil é","max_new_tokens":40}'
    curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:8997/health
    unset MANACA_SERVICE_KEY

    Expected result: Authorized health ready; response has continuation-only text and numeric token counts, 1–40 output IDs, explicit EOS/cap booleans. Missing key returns 401. No model execution outcome is claimed in this guide.

Performance evidence

No compatible measurement available. Documented support and estimated memory do not establish response speed.

Limits and troubleshooting

  • Documented only; no weights, installation, build or inference executed. Full memory fit, latency, speed and continuation quality remain unknown.
  • Manacá has 1,722,951,680 parameters despite its rounded 1B name; native Llama attention and MLP biases must remain enabled.
  • Use the exact fast tokenizer with NFKC and Lowercase. The tokenizer model_max_length sentinel is not the model limit; enforce native 4,096 combined input/output tokens. The input count includes native BOS.
  • Greedy 40-token continuation follows publisher example. No instruction-following, chat-template, thinking or exact-answer guarantee. Decoding returns only new IDs; EOS and cap flags distinguish a naturally stopped versus capped continuation.
  • Native weights are BF16; this CPU walkthrough explicitly converts to FP32. No quantized model or generic BF16 CPU speed claim is transferred.
  • The reader-authored HTTPServer is a serial educational private endpoint: one request at a time, 8,192-byte body limit, 10-second socket-read timeout, strict JSON fields and token budget. No generation timeout, multiprocess resilience, TLS or public-service hardening is supplied.
  • System and transitive dependencies resolve at installation. Record pip freeze and pip check; exact installed runtime compatibility remains unexecuted.
  • 32 GiB RAM, 40 GiB disk and four threads are allocations, not measured minima. Original dated AWS compute/storage excludes tax and unknown egress/admin; local power/purchase unknown.
  • Native README and linked official project LICENSE declare CC BY 4.0. Root LICENSE404 and CC legalcode403 are preserved; no legal-clearance or OSI claim. Broader workflow/backend/OS coverage remains open.
Tokenizer/config startup assertion fails
Stop. Recheck all exact native auxiliary hashes and native fast tokenizer normalization. Do not invent a chat template or remove bias assertions.
HTTP401,415,411,413 or422
Use the matching private key, JSON Content-Type and a single valid Content-Length. Keep the body <=8,192 bytes and prompt plus requested output <=4,096 native tokens; max_new_tokens must be 1–64.
Empty or unhelpful continuation
Inspect EOS/cap flags and decoded new token IDs. This is a base model; do not test it as an instruction chatbot. No exact completion is guaranteed.
Out of memory or connection refused
Inspect foreground startup and available host RAM. Stop on load failure. Resource or precision changes form a newly documented configuration.

Stop the model

  1. 1. Stop the service

    Press Ctrl+C in the server terminal. Unset the key in each client shell. Close the SSH tunnel; stopping Python does not stop EC2 billing.

    Command
    unset MANACA_SERVICE_KEY

    Expected result: The foreground service stops; loopback port 8997 no longer serves.

Uninstall

  1. 1. Remove dedicated files

    After confirming the path and preserving wanted logs, remove only this walkthrough directory. Shared apt packages remain.

    Command
    rm -r -- "$HOME/manaca-hosting"

    Expected result: Dedicated model, environment, wrapper and private key removed.

Shut down cloud resources

  1. 1. End cloud billing resources

    In EC2 us-east-1, stop for later reuse or terminate this exact VM. Review Delete on termination for its root volume. Delete unwanted detached EBS volumes, snapshots and reserved/Elastic/public IP resources. Stopped VM storage and retained resources may still bill. Check Bills/Cost Explorer later for final usage.

    Expected result: Exact instance is stopped/terminated as intended; no unwanted attached/retained billed resources remain. Instance compute stops only after its lifecycle transition, not when the Python service stops.

Sources and verification

Sources checked Oct 16, 2026. Verification source

Compare this configuration

Benchmarks

Performance scores for Manaca 1B Base across standard benchmarks.

CALAME-PThttps://huggingface.co/menezesbruno/manaca-1b-base
60.6%
LAMBADA-PThttps://huggingface.co/menezesbruno/manaca-1b-base
45.3%
HellaSwag-PThttps://huggingface.co/menezesbruno/manaca-1b-base
41.6%
ARC-Challenge-PThttps://huggingface.co/menezesbruno/manaca-1b-base
27.2%

Pricing and access

Open-weight model; no official hosted API price was found in the reviewed GitHub and Hugging Face sources. Runtime cost depends on the user's inference hardware or hosting provider.

Instituto IA/LNCC logo

Brazilian Portuguese AI research group

1 ModelsFounded 2026Brazil
View full profile