| source | title | type | organization | cleaned_by |
|---|---|---|---|---|
The Smol Training Playbook: The Secrets to Building World-Class LLMs |
Technical Blog Post |
Hugging Face |
Crawl4AI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import json | |
| from qwen_agent.llm import get_chat_model | |
| # I experimented with the 500 million parameters. It works nicely, but sometimes it doesn't detect all the parameters. For example, in the getCurrentWeather function, it may not detect the value for the second argument, which is the format of the temperature. So it's good practice to set default values for them. However, for very critical parameters, it understands them well. | |
| llm = get_chat_model({ | |
| # 'model': 'qwen2:0.5b', | |
| 'model': 'qwen2:1.5b', | |
| 'model_server': 'http://localhost:11434/v1', | |
| 'api_key': 'EMPTY', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| body { | |
| color:green; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import math | |
| def findAnomalyPosition(n): | |
| bit_length = int(math.ceil(math.log(n, 2))) | |
| #1010 & 0011 = 0010 It means and of any number to 33 << i is returning two consequitive bits at position i and i + 1 | |
| #XOR of n eith 2**i is toggling the bit at position i | |
| #so XOR n with 3 >> i is toggling bits at positions i and i + 1 and in our case | |
| #if bits in position i and i + 1 is 2 or 10 we want to make 01 which is this toggling with number 3 | |
| return [i for i in range(but_length) if ((x >> i) & 3) == 2 if ((x >> i) & 3) == 2] | |
| def generateNext(x): |