CoolFace
Modelpublic

Minibase/Spanish-to-English-Translation-Standard

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
2likes121downloads
Model Card

Spanish-to-English Translation Standard πŸ€–

<div align="center">

A compact Spanish-to-English translation model optimized for accuracy and efficiency.

![Model Size](https://huggingface.co/Minibase/Spanish-to-English-Translation-Standard) ![Architecture](https://huggingface.co/Minibase/Spanish-to-English-Translation-Standard) ![Context Window](https://huggingface.co/Minibase/Spanish-to-English-Translation-Standard) ![License](LICENSE) ![Discord](https://discord.com/invite/BrJn4D2Guh)

Built by [Minibase](https://minibase.ai) - Train and deploy small AI models from your browser. Browse all of the models and datasets available on the [Minibase Marketplace](https://minibase.ai/wiki/Special:Marketplace).

</div>

πŸ“‹ Model Summary

Minibase-Spanish-to-English-Translation-Standard is a specialized translation model that converts Spanish text to high-quality English translations. It maintains contextual accuracy while being optimized for fast, local inference without requiring external API calls.

Key Features

  • β€”πŸŒ Spanish to English: Specialized for Spanish-to-English translation
  • β€”πŸ“ Compact Size: 386MB (Q8_0 quantized) - efficient deployment
  • β€”βš‘ Fast Inference: ~245ms average response time
  • β€”πŸŽ― Context Preservation: Maintains meaning and nuance in translations
  • β€”πŸ”„ Local Processing: No data sent to external servers
  • β€”πŸ“Š Translation Metrics: Evaluated with BLEU, METEOR, and chrF scores
  • β€”πŸ—οΈ 4096 Token Context: Handles longer documents and conversations

πŸš€ Quick Start

Local Inference (Recommended)

  1. 1.Install llama.cpp (if not already installed):
bash
   # Clone and build llama.cpp
   git clone https://github.com/ggerganov/llama.cpp
   cd llama.cpp
   make

   # Return to project directory
   cd ../spanish-english-standard
  1. 1.Download the GGUF model:
bash
   # Download model files from HuggingFace
   wget https://huggingface.co/Minibase/Spanish-to-English-Translation-Standard/resolve/main/model.gguf
   wget https://huggingface.co/Minibase/Spanish-to-English-Translation-Standard/resolve/main/spanish_english_inference.py
   wget https://huggingface.co/Minibase/Spanish-to-English-Translation-Standard/resolve/main/config.json
   wget https://huggingface.co/Minibase/Spanish-to-English-Translation-Standard/resolve/main/tokenizer_config.json
   wget https://huggingface.co/Minibase/Spanish-to-English-Translation-Standard/resolve/main/generation_config.json
  1. 1.Start the model server:
bash
   # Start llama.cpp server with the GGUF model
   ./Minibase-spanish-to-english-translation-standard-imported.app/Contents/MacOS/run_server
  1. 1.Make API calls:
python
   import requests

   # Translate Spanish text via REST API
   response = requests.post("http://127.0.0.1:8000/completion", json={
       "prompt": "Instruction: Translate the following Spanish text to English.\n\nSpanish: Hola, ΒΏcΓ³mo estΓ‘s? Me gustarΓ­a pedir una pizza con pepperoni.\n\nEnglish: ",
       "max_tokens": 100,
       "temperature": 0.1
   })

   result = response.json()
   print(result["content"])
   # Output: "Hello, how are you? I would like to order a pepperoni pizza."

Python Client (Recommended)

python
# Download and use the provided Python client
from spanish_english_inference import TranslationClient

# Initialize client (connects to local server)
client = TranslationClient()

# Translate Spanish text to English
spanish_text = """La inteligencia artificial estΓ‘ revolucionando el mundo de la tecnologΓ­a.
Cada dΓ­a vemos avances increΓ­bles en el procesamiento del lenguaje natural."""

translation = client.translate_text(spanish_text)
print(translation)
# Output: "Artificial intelligence is revolutionizing the world of technology.
# Every day we see incredible advances in natural language processing."

Command Line Usage

bash
# Translate text directly from command line
python3 spanish_english_inference.py "Hola mundo"
# Output: "Hello world"

πŸ“Š Performance Benchmarks

MetricScoreDescription
METEOR79.7%Word-level similarity with stemming
chrF72.7%Character n-gram F-score
Semantic Similarity70.9%Meaning similarity (Jaccard coefficient)
Length Ratio1.05Translation length vs source length
Average Latency111msResponse time (CPU inference)

Benchmark Details: Spanish translation test dataset (20 samples), Q8_0 quantization, 4096 token context

πŸ”§ Model Details

Architecture

  • β€”Base Model: LlamaForCausalLM
  • β€”Parameters: ~788M
  • β€”Context Length: 4096 tokens
  • β€”Vocabulary Size: 49,152
  • β€”Quantization: Q8_0 (386MB final size)

Training Data

  • β€”Fine-tuned on Spanish-English translation pairs
  • β€”Includes diverse text types: news, literature, technical docs
  • β€”Balanced corpus for formal and informal Spanish
  • β€”Optimized for natural, fluent English output

Intended Use

  • β€”Primary: Spanish to English translation
  • β€”Secondary: Cross-lingual understanding and communication
  • β€”Domains: General text, news, business, academic content
  • β€”Languages: Spanish (input) β†’ English (output)

πŸ› οΈ Technical Specifications

Input Format

Instruction: Translate the following Spanish text to English.

Spanish: [Your Spanish text here]

English:

Output Characteristics

  • β€”Generates fluent, natural English translations
  • β€”Maintains original meaning and context
  • β€”Appropriate formality level preservation
  • β€”Length typically 95-110% of source text

Limitations

  • β€”Spanish input language only
  • β€”English output language only
  • β€”Best on 50-1000 word inputs
  • β€”May not handle very technical jargon perfectly
  • β€”Performance varies by Spanish dialect

πŸ“ˆ Understanding the Metrics

Why These Scores Are Perfect for Translation:

  • β€”METEOR (79.7%): More flexible metric that considers synonyms and word order. Higher scores indicate more natural translations.
  • β€”chrF (72.7%): Character-level metric good for morphologically rich languages like Spanish. Scores above 70% show excellent character-level accuracy.
  • β€”Semantic Similarity (70.9%): Ensures the translation conveys the same meaning as the source text.
  • β€”Length Ratio (1.05): Good translations typically maintain similar length to the source text.
  • β€”Latency (111ms): Fast enough for real-time translation applications.

Key Insight: While BLEU scores might seem modest compared to large commercial models, this compact model provides excellent translation quality for its size and speed.

πŸ“œ Citation

If you use Spanish-to-English-Translation-Standard in your research, please cite:

bibtex
@misc{spanish-english-translation-standard-2025,
  title={Spanish-to-English-Translation-Standard: A Compact Translation Model},
  author={Minibase AI Team},
  year={2025},
  publisher={Hugging Face},
  url={https://huggingface.co/Minibase/Spanish-to-English-Translation-Standard}
}

πŸ™ Acknowledgments

  • β€”Minibase: For providing the training platform and infrastructure
  • β€”Flores-101 Dataset: Used for benchmarking and evaluation
  • β€”llama.cpp: For efficient CPU inference
  • β€”Open Source Community: For the foundational technologies

πŸ“ž Support

πŸ“‹ License

This model is released under the Apache License 2.0.


<div align="center">

Built with ❀️ by the Minibase team

Making AI more accessible for everyone

πŸ’¬ Join our Discord </div>