A woman assaulted in a park in Melbourne's north managed to flee her attacker by stabbing him with his own knife, police say.

The man remained on the run early Monday morning, after sexually assaulting the woman in Thornbury's Mayer Park on the weekend.

The woman was walking a friend's dog through the park about 10.30pm on Saturday when she was approached by the man, who told her he had lost something, Detective acting Inspector Janet Mitchell said.

When she went to help, he produced the knife.