I am new to pre-trained language models in natural language processing. Could anyone give a hint on where should I start, or the road maps to start? - deep-learning

I know there are quite many hands-on tutorials about deploying BERT or other models. But the problem is many of them are just shallow user cases which only modified a few parameters using apis from a certain libraries such as keras. I am a novice and I often find my still confused at the details and variational steps when deploying pre-trained language models on my projects.
Could anyone give a hint on what is a better roadmap for learning coding with pre-trained language models, including any resources, articles, or tutorials, etc.
I have read many articles on Medium. But most articles there seems only introduc the general concepts, rather than providing the real know-how when learning it.

I find these two courses very novice-friendly:
Hugging Face course
https://huggingface.co/course/chapter1/1
Deep Lizard "Deep Learning Fundamentals - Classic Edition"
https://deeplizard.com/learn/playlist/PLZbbT5o_s2xq7LwI2y8_QtvuXZedL6tQU

Related

Seeking Guidance on getting started with Machine Learning

I have been active in development for many years, but commercially I have never had an opportunity to build something like https://www.ros-bot.com/ . I want to find ways I can do something like that from home that interfaces with a program and be able to train it much like a "bot" to do things much quicker than I as a input user could provide. Maybe this all falls under the category of deep learning.
So I am reaching out to this community for research idea, books, and or open source projects to tag along on, to find ways of automating and improving QoL of routine actions. I am not looking to be nefarious and just trying to learn to one up my automated infrastructure that is beginning to grow at my house in both leisure and practical activities.
First you should start form learning bout Supervised learning and unsupervised learning. There are some library that will helpful for you
Numpy, Pandas, Sklearn, Matplotlib, .You can watch videos on YouTube of Codebasics channel.

Where to find deep learning based prediction model

I need to find a deep learning based prediction model, where can I find it?
You can use Pytorch and Tensorflow pretrained models.
https://pytorch.org/docs/stable/torchvision/models.html
They can be automatically downloaded. There are some sample codes, that you can try:
https://pytorch.org/tutorials/beginner/blitz/cifar10_tutorial.html#sphx-glr-beginner-blitz-cifar10-tutorial-py
If you are interested in deep learning, I suggest you review the basics of it in cs231n stanford. Your question is a bit odd, because you first need to define your task specifically. Prediction is not a good description. You could look for models for classification, segmentation, object detection, sequence2sequence(like translation), and so on...
Then you need to know how to search through projects on github, and then you need to know python (in most cases), and then use a pretrained model or use your own dataset to train or fine-tune the model for that task. Then you could pray that you have found a good model for your task, after that you need to validate the results on a test set. However, implementation of a model for real-life scenarios is another thing that you need to consider many other things, and you usually need some online-learning strategy, like Federated Learning. I hope that I could help you.

Model free or model based deep reinforcement learning for car racing?

I'm new in the field of reinforcement learning. So I'm quite confused with "model based" or "model free" terms.
For example, in a video game, if I want to train an agent (a car) to drive on a racetrack.
If my input is a 256x256x3 first person image of the game, should I use a model free RL algorithm ?
And if I want to do the same, but with a 3rd person view above the racetrack, knowing coordinates, speed of the car and all obstacles, etc..., should I use model based RL ?
Thank you for your time.
In model-based you learn a model of the dynamics of your system and use it for planning or for generating "fake" samples. If you can learn the dynamics well, it can be extremely helpful, but if your model is wrong then it can me disastrous.
That said, there is no general rule for when to use model-free or model-based. Usually it depends on how much prior knowledge you have that can help you learning a good dynamics model.

Where can I learn the basics of writing a lexer?

I want to learn how to write a lexer. My university course had an assignment where we had to write a parser (and a lexer to go along with it) but this was given to us with no instruction or feedback (beyond the mark) so I didn't really learn much from it.
After searching for this topic, I can only find fairly advanced write ups which focus on areas which I feel are a few steps ahead of where I am at. I want a discussion on the basics of writing a lexer for a very simple language which I can use as a basis for investigating tokenising more complex languages.
At this stage I'm not really interested in best practices or optimisation techniques but instead prefer a focus on the essentials. What are some good resources to get me started?
Basically there are two main approaches to writing a lexer:
Creating a hand-written one in which case I recommend this small tutorial.
Using some lexer generator tools such as lex. In this case, I recommend reading the tutorials to the particular tool of choice.
Also I would like to recommend the Kaleidoscope tutorial from the LLVM documentation. It runs through the implementation of a simple language and in particular demonstrates how to write a small lexer. There is a C++ and an Objective Caml version of the tutorial.
The classical textbook on the subject is Compilers: Principles, Techniques, and Tools also known as the Dragon Book. However this probably falls under the category of "fairly advanced write ups".
The Dragon Book is probably the definitive guide on the subject, although it can be a bit overwhelming. Language Implementation Patterns and Programming Language Pragmatics are great resources as well.

Genetic Programming Online Learning

Has anybody seen a GP implemented with online learning rather than the standard offline learning? I've done some stuff with genetic programs and I simply can't figure out what would be a good way to make the learning process online.
Please let me know if you have any ideas, seen any implementations, or have any references that I can look at.
Per the Wikipedia link, online learning "learns one instance at a time." The online/offline labels usually refer to how training data is feed to a supervised regression or classification algorithm. Since genetic programming is a heuristic search that uses an evaluation function to evaluate the fitness of its solutions, and not a training set with labels, those terms don't really apply.
If what you're asking is if the output of the GP algorithm (i.e. the best phenotype), can be used while it's still "searching" for better solutions, I see no reason why not, assuming it makes sense for your domain/application. Once the fitness of your GA/GP's population reaches a certain threshold, you can apply that solution to your application, and continue to run the GP, switching to a new solution when a better one becomes available.
One approach along this line is an algorithm called rtNEAT, which attempts to use a genetic algorithm to generate and update a neural network in real time.
I found a few examples by doing a Google scholar search for online Genetic Programming.
An On-Line Method to Evolve Behavior and to Control a Miniature Robot in Real Time with Genetic Programming
It actually looks like they found a way to make GP modify the machine code of the robot's control system during actual activities - pretty cool!
Those same authors went on to produce more related work, such as this improvement:
Evolution of a world model for a miniature robot using genetic programming
Hopefully their work will be enough to get you started - I don't have enough experience with genetic programming to be able to give you any specific advice.
It actually looks like they found a way to make GP modify the machine code of the robot's control system during actual activities - pretty cool!
Yes, the department at Uni Dortmund was heavily into linear GP :-)
Direct execution of GP programs vs. interpreted code has some advantages, though in these days you'd probably rather want to go with dynamic languages such as Java, C# or Obj-C that allow you to write classes/methods at runtime while still you can still benefit from some runtime rather than run on the raw CPU.
The online-learning approach doesn't seem like anything absolutely novel or different from 'classic GP' to me.
From my understanding it's just a case of extending the set of training/fitness/test cases during runtime?
Cheers,
Jay