Instructions to use Noxus09/code-mixed-translation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Noxus09/code-mixed-translation with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Noxus09/code-mixed-translation", filename="unsloth.Q4_K_M.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Noxus09/code-mixed-translation with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Noxus09/code-mixed-translation:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Noxus09/code-mixed-translation:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Noxus09/code-mixed-translation:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Noxus09/code-mixed-translation:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Noxus09/code-mixed-translation:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Noxus09/code-mixed-translation:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Noxus09/code-mixed-translation:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Noxus09/code-mixed-translation:Q4_K_M
Use Docker
docker model run hf.co/Noxus09/code-mixed-translation:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use Noxus09/code-mixed-translation with Ollama:
ollama run hf.co/Noxus09/code-mixed-translation:Q4_K_M
- Unsloth Studio
How to use Noxus09/code-mixed-translation with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Noxus09/code-mixed-translation to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Noxus09/code-mixed-translation to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Noxus09/code-mixed-translation to start chatting
- Atomic Chat new
- Docker Model Runner
How to use Noxus09/code-mixed-translation with Docker Model Runner:
docker model run hf.co/Noxus09/code-mixed-translation:Q4_K_M
- Lemonade
How to use Noxus09/code-mixed-translation with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Noxus09/code-mixed-translation:Q4_K_M
Run and chat with the model
lemonade run user.code-mixed-translation-Q4_K_M
List all available models
lemonade list
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,58 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: apache-2.0
|
| 3 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
---
|
| 4 |
+
Here's a sample README for your project:
|
| 5 |
+
|
| 6 |
+
---
|
| 7 |
+
|
| 8 |
+
# Improved Code-Mixed Sentence Translation Using Decoder-Only Transformers
|
| 9 |
+
|
| 10 |
+
## Overview
|
| 11 |
+
|
| 12 |
+
This project addresses the limitations of traditional Neural Machine Translation (NMT) models in translating code-mixed sentences by utilizing a decoder-only transformer model. Inspired by the training methodologies of models like GPT and Llama, this approach leverages self-supervised learning to understand the context of languages more deeply. After learning the context, the model is fine-tuned on a smaller translation dataset, making it effective for translating both regular and code-mixed sentences.
|
| 13 |
+
|
| 14 |
+
## Benefits
|
| 15 |
+
|
| 16 |
+
1. **Fraction of Translation Dataset**: The model requires only a small amount of translation data for fine-tuning, which reduces the data preparation overhead.
|
| 17 |
+
2. **Rich and Meaningful Translation**: By understanding the underlying context of languages, the model provides more accurate and meaningful translations for both regular and code-mixed sentences.
|
| 18 |
+
3. **Multilingual Capability**: A single model can potentially translate multiple languages, making it a versatile solution for diverse translation needs.
|
| 19 |
+
|
| 20 |
+
## Approach
|
| 21 |
+
|
| 22 |
+
1. **Context Learning**: Train a decoder-only transformer model on a large corpus of text using self-supervised learning. This stage allows the model to grasp the contextual nuances of different languages.
|
| 23 |
+
2. **Fine-Tuning**: Fine-tune the pre-trained model on a smaller dataset specifically for translation tasks. This step adapts the model to effectively handle translation while retaining its contextual understanding.
|
| 24 |
+
|
| 25 |
+
## Example
|
| 26 |
+
|
| 27 |
+
Here is a comparison between the traditional Google Translate and the proposed approach:
|
| 28 |
+
|
| 29 |
+
- **Text**: “Sun ka diameter kya hoga?”
|
| 30 |
+
|
| 31 |
+
- **Google Translate**: “what will happen to sun's demetre”
|
| 32 |
+
|
| 33 |
+
-
|
| 34 |
+
|
| 35 |
+

|
| 36 |
+
|
| 37 |
+
- **Proposed Approach**: “What is the diameter of the Sun?”
|
| 38 |
+
|
| 39 |
+
The proposed method outperforms traditional translation models by providing a more accurate translation that respects the context and meaning of the original sentence.
|
| 40 |
+
|
| 41 |
+
## Usage
|
| 42 |
+
|
| 43 |
+
1. **Pre-training**: Train the decoder-only transformer model on a large text corpus.
|
| 44 |
+
2. **Fine-tuning**: Fine-tune the model on a smaller dataset of translated sentences.
|
| 45 |
+
3. **Translation**: Use the fine-tuned model to translate both regular and code-mixed sentences.
|
| 46 |
+
|
| 47 |
+
## Future Work
|
| 48 |
+
|
| 49 |
+
- **Evaluation**: Conduct thorough evaluations and comparisons with other state-of-the-art translation models.
|
| 50 |
+
- **Expansion**: Explore additional languages and code-mixed scenarios to enhance the model's versatility.
|
| 51 |
+
|
| 52 |
+
## License
|
| 53 |
+
|
| 54 |
+
This project is licensed under the [MIT License](LICENSE).
|
| 55 |
+
|
| 56 |
+
---
|
| 57 |
+
|
| 58 |
+
Feel free to adjust any sections as needed!
|