An Affidavit of Non-presecution is essentially a sworn statement from the victim stating that he/she does not want to go forward with the charges against the Defendant. The victim would need to do this voluntarily. It is better not to have the Defendant or the Defendant's attorney request this from the victim as this might be seen as tampering with a witness. It would be best if the victim would to go to the District attorney's office where the case is pending and file the affidiavit with the prosecutor. However this does not mean that the charges will be dismissed. It is still with the discretion of the District Attorney's office to proceed with the charges.
Mr. Williams' answer is correct. If you are the accused, you should definitely NOT talk to the complainant about the affidavit of non prosecution. You should let your attorney handle that conversation to avoid even the appearance of witness tampering.
Most large cities (and some smaller ones) have a specialized unit that deals with "victims". If the person interested in filing an affidavit of non prosecution, it is best to do it through the district attorney's office.
Be aware that the State does not have to honor the request of the complainant in any case, and may pursue prosecution despite the affidavit.
Finally, an affidavit of non-prosecution need not be in any particular form. If the complainant chooses to simply write up their own, it should include the complainant's name, address, telephone number, the accused's name, and the case number if available. It also should include the form about being sworn to, and be notarized.