Alif-1 8B Instruct is a cutting-edge Urdu language model designed for deep reasoning and cultural nuance, making it a powerful tool for multilingual AI applications. It is built on the Meta-Llama-3.1-8B architecture and fine-tuned with high-quality multilingual synthetic data. This model excels in both English and Urdu, ensuring a rich understanding of context, grammar, and cultural intricacies. Alif-1 offers state-of-the-art capabilities for text generation, translation, and complex reasoning tasks that can benefit many segments of people, such as researchers, developers, or language enthusiasts. As an open-source model under, it empowers users with flexibility, customization, and full control over deployments.
In this guide, we’ll cover how to install Alif-1 8B locally, enabling you to harness its Urdu language capabilities directly on your machine or on cloud GPUs.
Prerequisites
The minimum system requirements for this use case are:
- GPUs: Preferably RTX 3000-series or newer
- Disk Space: 200 GB
- RAM: At least 8 GB.
- Nvidia Cuda installed.
Note: The prerequisites for this are highly variable across use cases. A high-end configuration could be used for a large-scale deployment.
Step-by-step process to install & run Alif-1 8B locally
For the purpose of this tutorial, we’ll use a GPU-powered Virtual Machine by NodeShift since it provides high compute Virtual Machines at a very affordable cost on a scale that meets GDPR, SOC2, and ISO27001 requirements. Also, it offers an intuitive and user-friendly interface, making it easier for beginners to get started with Cloud deployments. However, feel free to use any cloud provider of your choice and follow the same steps for the rest of the tutorial.
Step 1: Setting up a NodeShift Account
Visit app.nodeshift.com and create an account by filling in basic details, or continue signing up with your Google/GitHub account.
If you already have an account, login straight to your dashboard.
Step 2: Create a GPU Node
After accessing your account, you should see a dashboard (see image), now:
- Navigate to the menu on the left side.
- Click on the GPU Nodes option.
- Click on Start to start creating your very first GPU node.
These GPU nodes are GPU-powered virtual machines by NodeShift. These nodes are highly customizable and let you control different environmental configurations for GPUs ranging from H100s to A100s, CPUs, RAM, and storage, according to your needs.
Step 3: Selecting configuration for GPU (model, region, storage)
- For this tutorial, we’ll be using the RTX 4090 GPU; however, you can choose any GPU of your choice based on your needs.
- Similarly, we’ll opt for 200GB storage by sliding the bar. You can also select the region where you want your GPU to reside from the available ones.
Step 4: Choose GPU Configuration and Authentication method
- After selecting your required configuration options, you’ll see the available VMs in your region and according to (or very close to) your configuration. In our case, we’ll choose a 1x RTX 4090 GPU node with 12 vCPUs/96GB RAM/200 GB SSD.
2. Next, you’ll need to select an authentication method. Two methods are available: Password and SSH Key. We recommend using SSH keys, as they are a more secure option. To create one, head over to our official documentation.
Step 5: Choose an Image
The final step would be to choose an image for the VM, which in our case is Jupyter Notebook, where we’ll deploy and run the inference of our model.
That’s it! You are now ready to deploy the node. Finalize the configuration summary, and if it looks good, click Create to deploy the node.
Step 6: Connect to active Compute Node using SSH
- As soon as you create the node, it will be deployed in a few seconds or a minute. Once deployed, you will see a status Running in green, meaning that our Compute node is ready to use!
- Once your GPU shows this status, navigate to the three dots on the right and click on Connect with SSH. This will open a new tab with a Jupyter Notebook session in which we can run our model.
Step 7: Install Ollama
- Update the Ubuntu package source-list for the latest versions of repositories.
apt update
Output:
2. Install Dependencies for Ollama.
apt install pciutils lshw
Output:
3. Install Ollama
curl -fsSL https://ollama.com/install.sh | sh
Output:
4. Start Ollama server.
ollama serve
Output:
5. Open a new terminal, connect to the remote server using SSH, and check if you’re able to sync with the Ollama server.
ollama --version
Output:
If it successfully shows the version, it means Ollama is installed correctly and is up and running.
Step 8: Install Alif-1 8B
- Install the model using the Ollama command.
You can download a different quantized format for this model from HuggingFace. For this tutorial, we are installing the f16 format.
ollama run hf.co/large-traversaal/Alif-1.0-8B-Instruct:F16
Output:
Since we just want to download it and not run it on the terminal, type /bye to exit the model console.
Step 9: Launch the model using Open WebUI
For demonstration purposes, we’ll use Open WebUI to give this model an intuitive interface to try its features. With Open WebUI, you can also customize the model and fine-tune it based on your own knowledge base.
Before moving further, install and setup Open WebUI in your system.
- Once you have Open WebUI installed and ready, launch the interface using the following command:
open-webui serve
This will launch the Open WebUI interface at http://localhost:8080
.
2. If you are using a remote server (for e.g. NodeShift GPUs), you will need to port forwarding and tunelling to access the above URL in your local browser.
For doing this, open a local terminal and run the below command by replacing:
<YOUR_SERVER_PORT>
with the PORT alloted to your remote server (For NodeShift server – you can find it in deployed GPU details on dashboard).
<PATH_TO_SSH_KEY>
with the path to the location where your SSH key is stored.
<YOUR_SERVER_IP>
with the IP address of your remote server.
ssh -L 7860:localhost:7860 -p <YOUR_SERVER_PORT> -i <PATH_TO_SSH_KEY> root@<YOUR_SERVER_IP>
Output:
Step 10: Access and test the model
- After forwarding the SSH ports, you can find the website running at
http://localhost:8080
.
2. Create an admin account and login.
3. This the main dashboard where you can chat with the model.
4. We are testing the model with an Urdu language prompt given below:
Prompt: اردو کے تین مقبول ترین مصنفین کے نام لکھیں۔
Translation: Write the names of the three most popular Urdu authors.
Answer: فیض احمد فیض، سعادت حسن منٹو، ممتاز مفتی
Translation: Faiz Ahmed Faiz, Saadat Hasan Manto, Mumtaz Mufti
Conclusion
By installing Alif-1 8B locally, you can use this powerful Urdu language model with advanced multilingual reasoning, cultural nuance, and deep contextual understanding. This guide has walked you through the setup process, ensuring you can leverage its capabilities for research, development, or AI-driven applications. For those seeking a seamless deployment experience, NodeShift Cloud offers a robust infrastructure to host and scale models like Alif-1 efficiently, eliminating hardware constraints and optimizing performance. Whether running it locally or in the cloud, Alif-1 opens new possibilities for AI-driven Urdu language processing.