I’ve signed up at Udemy to create a course on how to use Python with FastAPI and Celery. Celery is great for running async tasks in the background. I’ve used it in my projects to run offline tasks like sending emails, processing images, reports and more.
FastAPI is a modern web framework for building APIs with Python 3.6+ based on standard Python type hints. It’s fast, easy to use and has great documentation.
Ollama is aweome! I can now download and run AI models on my computer.
I first installed Ollama. Then I downloaded the Llama 2 model.
1 ollama pull llama2 Kinda reminds me of Docker.
1 2 3 4 5 6 7 8 9 10 11 rohan@polaris ~> ollama run llama2 >>> What is BPE (Byte Pair Encoding)? Byte Pair Encoding (BPE) is a text representation technique used in natural language processing (NLP) and machine learning (ML) to reduce the dimensionality of text data.
Motivation This is a simple implementation of a Multilayer perceptron (MLP) character-level language model. The code and documentation directly follows Andrej Karpathy’s excellent YouTube video on the same topic. You can find the video here: https://www.youtube.com/watch?v=TCH_1BHY58I
Andrej uses a database of people names, and then builds a model to generate new baby names. I will use a database of heavy metal band names, and my model will generate new band names :) You can download the dataset from here - https://github.
What is a tensor? A tensor is a generalization of vectors and matrices and is easily understood as a multidimensional array. A tensor can be a number, a vector, a matrix, or any n-dimensional array.
Examples 0-d tensor: scalar 1-d tensor: vector 2-d tensor: matrix 3-d tensor: cube n-d tensor: n-d array Rank The rank of a tensor is the number of dimensions present within the tensor. For example, the tensor [1, 2, 3] is a rank 1 tensor, while the tensor [[1, 2, 3], [4, 5, 6], [7, 8, 9]] is a rank 2 tensor.